We have a number of set variable names:
firstname, lastname, ref, website, organisation, streetaddress_1, streetaddress_2, city, state, zipcode, country, phone_1, phone_2, cellphone, fax, title, department, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10
...and your task is to build a PHP-based form app that let's the user choose which are to be used, with only firstname and email being default.
All should be input type="text" except "ref" which should rather be given a value by the user, e.g. [url removed, login to view], and custom_1-10 which could have either input types:
* textarea (suggested 3 rows)
* checkbox (plus the label and value to use)
You should use:
[url removed, login to view]
...or check with me if you have a better suggestion.
Use also its possibility for the user to select if they want to use its recaptcha mechanism.
All form-fields should be validated against most common things if the user clicks in that the form-field is required (mark with *, by default, only email is required)
The user should be able to customize a title, an introduction, the label-name, and the value, as well as the submit-button value. The user should also be able to choose an image upload above, and/or to the right of the form, and be able to set a width/height for the whole form.
The user should also be able to choose the following two options as extra:
* a checkbox and its label name with default saying: "I want to be contacted", and if clicked, more options than firstname/email will appear.
* 2 or 3 radio-buttons letting a user select values from drop-downlists (that later will be pre-populated by us), and the user should be able to edit labels for these, with the examples: "I'm interested as a consumer" / "I'm interested for my organization" if 2 and if three, the extra option can be: "I'm interested as a potential reseller"
Finally, the form should:
1) generate a preview
2) generate a complete form source-code to cut out, and
- No frameworks except jQuery are allowed.
- All styles should be in separate CSS-files. Inline CSS is a big no-no!
- File structures must be clear, simple & make sense.
- The code should be neatly indented and well commented
- Names of variables and functions need to be clear and understandable
- Use tooltips based on jQuery cluetip where appropriate. Clarification is always a good thing.