Topic RSS
Related Topics
1:29 am
I've followed the examples in Help! to create a custom run-time form, but the fields I've set as required aren't required when the form is built. All of the other flags (isdisabled, isemail, isclear, isreadonly) seem to work fine, but nothing comes up as required. Also, the submit button is blank. Any help you can offer would be greatly appreciated!
Here's my code:
$formdata = array(
array('Your Contact Info','fieldsetstart',0,0,0,0,0),
array('Your Name|Your Name','textfield',1,0,1,0,0),
array('Company','textfield',0,0,0,0,0),
array('Mailing Address','textfield',1,0,0,0,0),
array('Address 2','textfield',0,0,0,0,0),
array('City','textfield',1,0,0,0,0),
array('State#-Please select one-|#AL#AK#AZ#AR#CA#CO#CT#DE#DC#FL#GA#HI#ID#IL#IN#IA#KS#KY#LA#ME#MD#MA#MI#MN#MS#MO#MT#NE#NV#NH#NJ#NM#NY#NC#ND#OH#OK#OR#PA#RI#SC#SD#TN#TX#UT#VT#VA#WA#WV#WI#WY#PR','selectbox',1,0,0,0,0),
array('Zip Code','textfield',1,0,0,0,0),
array('Email','textfield',1,1,0,0,0),
array('Phone|555-555-5555','textfield',1,0,1,0,0),
array('How would you prefer to be contacted? #Phone|phone #Email|email','radiobuttons',0,0,0,0,0),
array('','fieldsetend',0,0,0,0,0),
array('The business you are requesting an RFP from','fieldsetstart',0,0,0,0,0),
array($businessName,'textfield',0,0,0,0,0),
array($businessEmail,'hidden',0,0,0,0,0),
array('','fieldsetend',0,0,0,0,0),
array('Tell Us About Your Event','fieldsetstart',0,0,0,0,0),
array('What type of event are you planning? #Meeting|Meeting #Company-wide Event|Company-wide Event #Conference|Conference #Golf Outing|Golf Outing #Reunion|Reunion #Training|Training #Party|Party #Fund Raising|Fund Raising #Social Occasion|Social Occasion #Team Building|Team Building #Dinner Banquet|Dinner Banquet #Other|other','selectbox',1,0,0,0,0),
array('If other, what type of event?','textfield',0,0,0,0,0),
array('What type of resources will you need? #Air travel|Air travel #Audio-visual services|Audio-visual services #Casino|Casino #Caterer|Caterer #Conference or Conf. center|Conference or Conf. center #Cruise ship|Cruise ship #CVB|CVB #Decor and Floral|Decor and Floral #Entertainment|Entertainment #Games and recreation|Games and recreation #Golf facility|Golf facility #Ground travel|Ground travel #Hotel|Hotel #Hunting and fishing retreat|Hunting and fishing retreat #Resort|Resort #Restaurant|Restaurant #Speakers|Speakers #Special event facility|Special event facility','multiselectbox',1,0,0,0,0),
array('Number of attendees? #Less than 15|Less than 15 #16-25|16-25 #26-50|26-50 #51-100|51-100 #More than 100|More than 100','selectbox',1,0,0,0,0),
array('Location of event|City, State','textfield',1,0,1,0,0),
array('','fieldsetend',0,0,0,0,0),
array('Start date and time','fieldsetstart',0,0,0,0,0),
array('Start date','textfield',0,0,0,0,0),
array('Start time','textfield',0,0,0,0,0),
array('','fieldsetend',0,0,0,0,0),
array('End date and time','fieldsetstart',0,0,0,0,0),
array('End date','textfield',0,0,0,0,0),
array('End time','textfield',0,0,0,0,0),
array('Are these times flexible?#Yes|yes#No|no','radiobuttons',0,0,0,0,0),
array('','fieldsetend',0,0,0,0,0),
array('Other details','fieldsetstart',0,0,0,0,0),
array('Number of sleeping rooms','textfield',0,0,0,0,0),
array('Desired room rate #less than $100|less than 100 #$101-150|101-150 #$151-200|151-200 #$201-250|201-250 #more than $250|more than 250','selectbox',0,0,0,0,0),
array('Budget for your event','textfield',1,0,0,0,0),
array('Other information about your event','textarea',0,0,0,0,0)
);
$i = 0;
foreach ($formdata as $field) {
$fields['label'][$i] = $field[0];
$fields['type'][$i] = $field[1];
$fields['isreq'][$i] = $field[2];
$fields['isemail'][$i] = $field[3];
$fields['isclear'][$i] = $field[4];
$fields['isdisabled'][$i] = $field[5];
$fields['isreadonly'][$i++] = $field[6];
}
insert_custom_cform($fields,'1');Most Users Ever Online: 959
Currently Online:
43 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
tracedef: 43
mores: 21
Gyrus: 20
frozenwaste: 18
asuffredini: 15
photoworks: 14
Member Stats:
Guest Posters: 3552
Members: 1464
Moderators: 3
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 5159
Posts: 18392
Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass
Moderators: Paul (421), cnymike (8), sonika (95)
Administrators: Oliver (6398)
FAQs
Home
Add Reply
Add Topic
Quote










