Cforms 6- Custom : Creating dynamic forms (select box autofill)
-
Hi,
I’m using WordPress 2.6.3 and CformsII 9.3. And I want to create a selectbox in one of my forms which will be filled with an database.
I’ve read the paragraph 6 of the help file (Creating dynamic forms) but I can’t understand where to put the example code at the end of the paragraph in order to test it.
If someone could tell me what to do with this would be so nice.
above the example code which is in the help :
-
$fields = array();
$formdata = array(
array(‘Votre nom|Votre nom’,’textfield’,0,1,0,1,0),
array(‘Votre email’,’textfield’,0,0,1,0,0),
array(‘Votre message’,’textarea’,0,0,0,0,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,”); //call the default forms with two new fields
- The topic ‘Cforms 6- Custom : Creating dynamic forms (select box autofill)’ is closed to new replies.