Questions tagged [quickform]

HTML_QuickForm2 is a PHP5 rewrite of HTML_QuickForm and HTML_QuickForm_Controller packages, hosted in the PEAR repository. It provides methods to create, validate and render HTML forms or wizards using an OOP Controller.

Full description is available in PEAR: HTML_Quickform2

  • Supports all form elements defined by HTML standard, provides several custom elements.
  • Server-side and client-side validation, several common rules provided.
  • Multipage forms (tabbed forms and wizards)
  • Pluggable elements, rules, renderers and renderer plugins
  • DOM-like API for building the form structure, new streamlined API for elements' values handling.
  • and many more features
43 questions
4
votes
1 answer

PEAR HTML_QuickForm2: How to get the saved session container back in form

I am using the controller to make a multiple page form. I am saving submitted and unsubmitted applications data to a database field: $serialized_data = $oCon->dbConn->real_escape_string( …
Sabine
  • 121
  • 4
  • 4
3
votes
1 answer

Quick form validation

I use db dataobject, and thus quickform. I got stuck with a problem. want to set a validation at the client side to check a file name extension. Can't find a way out. the field is like: 'pathname' => array( 'type' => 'varchar', 'size'…
Dolphin
  • 333
  • 1
  • 3
  • 9
3
votes
1 answer

How to validate custom fields in moodle

is there a way to add regex validation in custom fields for signing up in moodle? I'm tricking with the signup_form.php and signup.php files but i can't manage to achieve it. I added some fields with the addelement() function and addrule() but it…
3
votes
4 answers

Meteor 1.3 autoform / quickform error

I'm new to meteor and just arrived after the release 1.3. I've struggled to debug some very "stupid" things due to omitted imports or exports as most of the tutorials don't seem to include that. So the below issue might be of the same type. I would…
Steven Tib
  • 33
  • 3
2
votes
2 answers

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…
Chuck
  • 4,662
  • 2
  • 33
  • 55
2
votes
2 answers

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,…
Jakub Stejskal
  • 571
  • 2
  • 9
  • 25
2
votes
1 answer

quickforms and moodle

Please help me, does anybody know where I am going wrong, this is starting to annoy me. I am using moodle 2.2 and quick forms, it saves to the database on submit but then returns to the form with error. mysqli::real_escape_string() expects parameter…
Codded
  • 1,256
  • 14
  • 42
  • 74
1
vote
2 answers

QuickForm2 - client side validation

http://pear.php.net/package/HTML_QuickForm2/ http://download.pear.php.net/package/HTML_QuickForm2-0.6.1.tgz I am able to use this fine for forms but I'm having problems getting the client side validation to work. I don't think I have the correct…
1
vote
0 answers

Get Set Values JavaScript Quick View Form - Dynamics

Im trying to retrieve a value from a quick view form of a related entity and trying to set a hidden field on this form so I can use the value to send out an email. I have got the below code so far, but have been unable to get it to work. New to this…
1
vote
1 answer

Meteor, creating update form and filling fields

I have the following structure: { id: 23423-dsfsdf-32423, name: Proj1, services: [ { id:sdfs-24423-sdf, name:P1_Service1, products:[{},{},{}] }, { id:sdfs-24jhh-sdf, …
Erez
  • 1,933
  • 5
  • 29
  • 56
1
vote
0 answers

Meteor quickforms and simple-schema not working

I am using the following code in cars.js which is in lib folder, Cars = new Mongo.Collection('cars'); Cars.allow({ insert: function(userid, doc) { return !!userid; } }); CarSchema = new SimpleSchema({ …
1
vote
1 answer

PEAR HTML Quickform - Default File Upload path

I am using PEAR HTML Quickform for various forms on my php website. One of the issue I am having is that if a user select a file to upload (button Browse...) and submit while he forgot to fill a required field, the form is reloaded with all the…
Clement
  • 51
  • 1
  • 10
1
vote
1 answer

PEAR QuickForm2 CSRF Protection

I was looking for a way to ensure CSRF-Protection in my Quickform2. I found this link but it's for QuickForm1. Any ideas how I can adapt this to QF2?
Ron
  • 22,128
  • 31
  • 108
  • 206
1
vote
0 answers

QuickForm validation of one field based on another

I am trying to validate a QuickForm (v1 not v2) form where there are three fields where the second two fields only needs to be completed if the first field is completed. Specifically, the first field is a radio button input like so:
drpudding
  • 159
  • 4
  • 14
1
vote
1 answer

Pear Quickform2 File Upload handling

I'm trying to build a proper file upload handling via Pear quickform 2. My serverside approach would be: $submitValues = $editForm->getValue(); $filename = submitValues['uploaded_image']['name']; $move_file = move_uploaded_file(.....) Is there…
Jonas
  • 302
  • 2
  • 13
1
2 3