Olliver,
I'm planning on hundreds of businesses, so a drop-down wouldn't work for this.
What I decided to do (for simplicity and style) was to place a form at the bottom of the page, while I have easy access to the email_ID.
What I'm trying to do is to use a dynamic form that will pass the users ID in a hidden variable to the post-processor, which will email out the form to the business.
A problem that I'm faced with is that my Submit button is blank, and I don't know why! I have a value of Contact for my 'Submit Button Text', but it isn't being picked up.
I'm using form number 1 with only a fieldset, and everything else is in my post (not page, if the difference matters).
How do I get a value for my Submit button?
I'm using 8.7 of CForms
My form can be viewed here:
http://www.gjzone.com/kettlewell-enterprises/
Here's my code: (Hope the code comes out right)
$fields = array();
$formdata = array(
array('Contact This Business', 'fieldsetstart', 0,0,0,0,0),
array('Your Name|Your Name','textfield', 0,0,0,1,0),
array('Email','textfield', 0,0,1,1,0),
array('Phone', 'textfield', 0,0,0,1,0),
array('Website', 'textfield', 0,0,0,1,0),
array('Your Message','textarea', 0,0,0,1,0),
array('hidden_id|BOOGIE', 'hidden', 0,0,0,1,0)
);
$i=0;
foreach ( $formdata as $field ) {
$fields['label'][$i] = $field[0];
$fields['type'][$i] = $field[1];
$fields['isdisabled'][$i] = $field[2];
$fields['isreq'][$i] = $field[3];
$fields['isemail'][$i] = $field[4];
$fields['isclear'][$i] = $field[5];
$fields['isreadonly'][$i++] = $field[6];
}
insert_custom_cform($fields,'1');
If you need more data, let me know.
Any thoughts on what I can check to fix this?
Thanks
Matt