quickform

PHP PEAR Quickform validation help

I am using PEAR's Quickform package to validate a form I have, I need help getting a validation rule applied to a group of checkboxes. $subjectArea[] = HTML_QuickForm::createElement('advcheckbox', 'SubjectArea', null, 'Student', 'id="subjectareastudent"', 'Student'); $subjectArea[] = HTML_QuickForm::createElement('advcheckbox', 'Subject...

PHP - QuickForm Submits as Get Rather Than Post

I am trying to get started with PEAR's HTML_QuickForm but I'm having a problem. For some reason all of my form data is being submitted with GET and not POST. The default is supposed to be POST and I've tried setting it explicitly. The only thing I've been able to figure out is that when I simply call display() on the form it works cor...

Accessing array value

print_r($fanr); results in: HTML_QuickForm_text Object ( [_label] => FA-Nummer [_type] => text [_flagFrozen] => [_persistantFreeze] => 1 [_attributes] => Array ( [name] => auftragsnr [type] => text [value] => 123 ) [_tabOffset] => 0 [_tab] => [_lin...

How to set values displayed after submit using PEAR QuickForm?

Let's say I've got form like this: $form = new HTML_QuickForm('Novinky'); $defaults = array('text' => ''); $form->setDefaults($defaults); $elements['text'] = $form->addElement('textarea', 'text', 'Text', array('cols'=>55, 'rows'=>10, 'id'=>'text')); $form->addElement('submit','save','Save'); if (isset($_POST[save])) { if ($form->v...

How to set IDs for select elements of Quickform_date?

Is there some way to add ID attribute to every select element generated by Quickform_date so it would look for example like this? <select id="date-d" name="date[d]"> <option value="1">01</option> <option value="2">02</option> ... <option value="31">31</option> </select><select id="date-M" name="date[M]"> <option v...

How can I use QuickForm to add disabled select options?

I have code using QuickForm that creates a select widget with the following: $form->addElement( 'select', 'state_id', 'State:', statesArray() ); statesArray() queries the database to get the states available and returns an associative array with the ids linked to the state names. I'm using a similar technique throughout the solution. ...

how can I remove a quickform rule?

I have a form that has several validation rules defined via quickform. I am using a hook to inject some code into the process, and want to remove/disable a rule that was defined earlier in the code. Does QuickForm have any way to "unset" a rule? ...

Where can I QuickForm2 documentation

Hello guys. I spent the past few hours searching for a tutorial/documentation for QuickForm2 but seems like there is no such thing other than the examples attached with the package itself which are not sufficient at all. I tried looking through the API documentation but I can't find a method called addElement for example which is the mos...

Is there any good tutorial on PEAR HTML_QuickForms2?

Hello, I've been searching for good tutorials on Pear HTML_QuickForms2 but so far I was unable to find any... I found a tutorial which claims to be able to teach you complex forms, however apart from being a good starting point doesn't get as deep as I would like.. Also, I know PEAR Docs have some reference documentation but I would ...