[eluser]chadbob[/eluser]
I need some HTML form extension help...I've got it working and saving forms, but it's missing one of my relationships.
Here is my DB table structure:
locations
locations_statutes
reports (reports has an in table foreign key for location)
reports_statutes
statutes
Everything works as normal when reading from the DB.
When the HTML form extension saves a report, a new report table entry is made, and reports_statutes is updated with the relationship, but it doesn't update the locations_statutes table with that relationship.
Here are the field snippets from my code:
Code:
// This is how are form will be rendered
$form_fields = array(
'id',
// Section header
'Report Contents' => 'section',
'date',
'description',
// Section header
'Locations and Statutes' => 'section',
'location',
'statute'
Code:
// Use the (already-loaded) array extension to process the POSTed values.
$rel = $rep->from_array($_POST, array(
'id',
// Section header
'section',
'date',
'description',
'location',
'statute'