CFv4 Elements and HTML

How can I get my form signed?

Posted: Feb 9 2013, 12:26
A client requested a form that could be signed. They were using it to conduct household surveys and wanted to record the form details with a facsimile signature of the householder (and the interviewer in the actual application). The only code that I could find to do this was 'Signature Pad', a jQuery plug-in. This FAQ gives and overview of using the plug-in with ChronoForms.

How can I use 'star ratings' in my form?

Posted: Jan 17 2013, 07:24
If you are creating rating forms then it can look better and be simpler to use if you show the user a row of stars to check instead of a drop-down or a radio button group. This FAQ shows you one way to do this.

How can I ask new users for information and not ask logged in users?

Posted: Jan 9 2013, 05:01
If you have a form that needs contact information like name and email then this is already saved in the User data for registered users. It can be useful to show this saved information if the user is logged in but still ask new users to complete the form inputs. This FAQ shows a way to do this.

My form inputs are too wide

Posted: Jan 4 2013, 05:12
There are two situtations where form inputs look too wide. One is when the form is in a narrow module and the default ChronoForms setting is too big; the other in a full page when the template CSS over-rides the ChronoForms setting.

How can I show data linked to a drop-down option?

Posted: Dec 31 2012, 08:53

A user wanted to be able to display a serial number associated with some of the options in a large select drop down element. The request was to display the number if there was one, otherwise to hide the field. While this is an uncommon request the code is posted here because it could be adapted to meet various similar needs.

How can I build a tabbed form?

Posted: Dec 28 2012, 09:44
Long forms can be difficult for the user to work though and can look very complicated on the page. It can be very useful to break them up into smaller pieces. This tutorial is about splitting the form across several tabs. (There is another tutorial about building a multi-page form.)

How can I add a colour picker to my form?

Posted: Dec 14 2012, 08:28

If you need your users to be able to select colours then adding a colour picker which shows them a range of coloured swatches to choose from can be helpful. This FAQ uses one particular MooTools based picker but could be adapted to other similar pickers.

Why can't I see my form?

Posted: Dec 12 2012, 07:48

If you are new to ChronoForms and start using the Form Wizard sometimes all you can see when you view your form is is the ChronoForms strap-line, or maybe an empty page. Here's the answer.

How can I style the Reset and Back buttons?

Posted: Dec 8 2012, 06:30
You can add a Class attribute to the Submit button but this is not applied to the Reset and Back buttons if they are enabled (in CFv4 RC3.5). You can add classes with a couple of lines of Javascript:

How can I show/hide a textarea when a checkbox is clicked?

Posted: Dec 1 2012, 12:24
Here's an example of a script to hide a textarea or a text input based on a checkbox setting.