background preloader

ChronoForms

Facebook Twitter

View topic - How to dynamically add new field in frontend. Handling select box (drop-down list) in a PHP form. This tutorial will show you how to add select boxes and multi-select boxes to a form, how to retrieve the input data from them, how to validate the data, and how to take different actions depending on the input.

Handling select box (drop-down list) in a PHP form

Select box Let’s look at a new input: a “select” box, also known as a “drop-down” or “pull-down” box. A select box contains one or more “options”. Each option has a “value”, just like other inputs, and also a string of text between the option tags. This means when a user selects “Male”, the “formGender” value when accessed by PHP will be “M”. The selected value from this input was can be read with the standard $_POST array just like a text input and validated to make sure the user selected Male or Female.

It’s always a good idea to have a “blank” option as the first option in your select box. . ( For a generic, easy to use form validation script, see PHP Form Validation Script ) Multi-select Suppose you want to present a select box that allows the user to select multiple options. Using the Chronoforms Joomla! extension to create an autoresponder. Chronoforms Chronoforms is an extension for Joomla!

Using the Chronoforms Joomla! extension to create an autoresponder

That allows you to easily create forms. The most common uses are to email information to someone (e.g. the results of a contact form) or store it in a database for later use. I’ve used it to implement basic contact forms, appointment request forms and membership applications. It’s surprisingly powerful, even for folks who don’t know the ins and outs of HTML, CSS and PHP.

Sending Email With excellent support for sending email, Chronoforms allows one to generate multiple messages based on templates. Autoresponders with Calculations Recently, I had a request from a customer to create a form for their Joomla! After some time spelunking the forum, I hit upon a solution posted by Bob Janes (a.k.a. Creating the Form If you want to do calculations, you’re going to need to know PHP, or hire someone who knows PHP. Steps Step 1: If you don’t have Chronoforms installed, visit the extension’s page to download it. Step 6: Add a “submit” button. Conclusion. Combo dinámico en Chronoforms. These three form elements: select drop-downs, checkbox groups and radio button groups all accept lists of options i.e. value+label pairs.

Combo dinámico en Chronoforms

This FAQ shows you several ways in which ChronoForms can create option lists. Most of the FAQ will look at select drop-downs but the same methods can be used with checkbox groups or radio button groups. Although they look different these three elements are similar in the way that they work. Radio button groups and standard select drop-downs allow the user to make a single selection from a list of options; checkbox groups and select dropdowns with the 'multiple' option allow several options to be selected. Simple label list The simplest way of creating an option list is to type a list of labels into the Element Options box: Blue Yellow Red Green.