rax-table checkbox

Discuss anything that's related to the Raxan framework

rax-table checkbox

Postby fc_enriqueism » Fri Sep 30, 2011 12:58 am

I have a rax-table, and I want to add a checkbox column to select multiple items (insted "Ctrl+click"), Somebody have a idea if its possible?
Code: Select all
<tbody id="emplistBody">
    <tr class="{ROWCLASS}" data-event-value="{idhistacadrelasun}">
    <td>
          <input type="checkbox" name="selected" value="{idhistacadrelasun}" />
    </td>
    <td>
        <a href="editgrado.php?idhistacadrelasun={idhistacadrelasun}">{descnivacad}</a>
    </td>
    <td>{carrera}</td>
    <td>{otrainst}</td>
    <td>{anio}</td>
   </tr>
</tbody>


I need an array with all "idhistacadrelasun" selected with the checkbox

Thanks in advance
fc_enriqueism
 
Posts: 10
Joined: Wed Sep 28, 2011 12:25 am

Re: rax-table checkbox

Postby raymond » Sun Oct 02, 2011 1:18 am

Hi,

For PHP to return an array of values for the checkbox you must append "[]" to the end of the name:

Code: Select all
    <input type="checkbox" name="selected[]" value="{idhistacadrelasun}" />


To retrieve the post value from the page controller use:

Code: Select all
   $values  = $this->post->selected; // this should return an array of values.


__
Raymond
raymond
Site Admin
 
Posts: 215
Joined: Tue Mar 17, 2009 5:04 am


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron