I'm using joomla 3.4.6, and Form Maker component, I'm trying to modify the submission page.
I have a table that contains some data and a column with checkboxes. I also have a button "Save" When I click the button "Save", I want to save the value from the checkboxes in the database (0 for unchecked, 1 for checked)
I hope i'm providing code snippets that makes sense.
Save button
<div>
<input type="hidden" name="hide_label_list" value="<?php echo $lists['hide_label_list']; ?>" />
<input type="button" style="vertical-align:middle; cursor:pointer" value="<?php echo JText::_( 'save' ); ?>" />
</div>
Check boxes from database
<table class="submissions" width="100%">
...
<tr class="<?php echo "row$k"; ?>">
<td align="center"><?php echo $www+1+$pageNav->limitstart;?></td>
<?php
if(1==1)
{
if($resolved == 0)
echo '<td align="center">
<input type="checkbox">Closed</input>
</td>';
else
echo '<td align="center"><input type="checkbox" checked>Closed</input></td>';
}
...
</table>
I checked https://docs.joomla.org/Inserting,_Updating_and_Removing_data_using_JDatabase and other google results, but because I'm new with php/joomla and working on an existent extension [Form Maker] it makes it hard to understand.
Here's the full php file in case it would make more sense
How can I update if checked and click save button?