Hello,
I'm working with Drupal 7.x
I'm trying to create a form for an ordering sheet to use internally. The form consists of a table of items that can be ordered with each row including a textfield for quantities to be entered and then a submit button to place the order.
I can construct the form as I want it using the at the bottom of the post.
The functions first make a form with textfields for each record in the inventory, a hidden field of all of the records for parsing, and a submit button. When rendering, I loop through all of the records and render the textfield in a table with the record information.
When testing I can enter values into the textfields, but when I press the submit button, none of the values of the text fields are recorded with the $form_state. It is as though all of the textfields are empty on form submit.
There are several debugging print statements to test as well as the SQL statements for generating the database tables if anyone can help.
Thanks
Kyle
<?php
function horizontal_order_form($form_state){ //, $node){
$form = array();
//print_r($node);
//print '
Setting key value to '. $node['build_info']['args'][0]['key'];
$results = db_query('SELECT * FROM lab_inventory');
// for each row in the form we make a set of keys and fields to add to the form
$keys = array();