5
How do you add more than one required field?
I tried
$reg_form->setRequired($lname_text, $name_text, $email_text);
But it only makes the first one ($lname_text) required, the others are not. Email sort of works because once you submit it checks it for formatting, but name won't work at all.
I also tried
$reg_form->setRequired($lname_text);
$reg_form->setRequired($name_text);
$reg_form->setRequired($email_text);
This just breaks the page (blank page)
Any suggestions?
Here's how I added the fields:
$name = isset($HTTP_POST_VARS['name']) ? $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['name']) : "";
$name_text = new XoopsFormText(_US_NAME, "name", 25, 60, $name);
$lname = isset($HTTP_POST_VARS['lname']) ? $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['lname']) : "";
$lname_text = new XoopsFormText(_US_LNAME, "lname", 25, 60, $lname);
....
$reg_form->addElement($name_text);
$reg_form->addElement($lname_text);