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}">
          <input type="checkbox" name="selected" value="{idhistacadrelasun}" />
        <a href="editgrado.php?idhistacadrelasun={idhistacadrelasun}">{descnivacad}</a>

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

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

Re: rax-table checkbox

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


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.

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 3 guests