Ajax Forms
The custom tag makes very easy to use the great validation jquery plugin and his numerous methods and to submit the forms in ajax mode filling up any element you choose with the server response. The ajax mode manage html server responses.
Find more examples and documents in the Api Browser Page
Error message displayed inline
Basic form behaviour.
- The cfJq_forms tag simply wrap the forms mark up.
- Minimum requirments is the ACTION attrbutes. By default the METHOD is GET.
- If the TITLE attributes is not specified in the required fields a general error message is displayed
- If the AJAX attributes is not set to true the form.js is not loaded saving band.
<cf_cfjq_forms action="/app/site/ajax/response.cfm" jqFolder="/jquery/">
<fieldset>
<p><label for="cname">Name (required)</label>
<input name="frmName" class="{required:true}"/>
</p>
<p><label for="cemail">E-Mail (required)</label>
<input name="frmEmail" class="{required:true,email:true}"/>
</p>
<p><input name="sbt" class="submit" type="submit" value="Submit"/></p>
</fieldset>
</cf_cfjq_forms>
Your business needs efficiency as well as effectiveness in its daily processes. Some of things in most common business processes can be made more productive. Go for wireless networking and people in the office will have internet accessibility all over the office. Make sure your website hosting company has online backup facility to have your vital website business running smoothly. Develop a reporting system with your advertising agencies to have your projects inputs develop on time.
Ajax Behaviour
- Adding the attribute AJAX="TRUE" the form will prepare to be submitted with no page realoading
- The form expect a target element to use for displaying the server response.
Specify the target using the TARGET attribute using the css syntax ( or any jquery supported selector ).
Ex: for loading in a div with id ajaxContent use - target="#ajaxContent".
for loading in a div with class ajaxContent use - target=".ajaxContent" - You can use the same target for more forms in the same page
- The Target tag shows as deafult a span element with "Loading...." text during the ajax call. You can customize the message with the attribute loadMsg. For styling purpose the span receive the class "cfjq_loading" that can be changed using the attributes "loading_class"
<cf_cfjq_forms action="/app/site/ajax/response.cfm" ajax="true" jqFolder="/jquery" fade="true" target="#ajaxContent"> ---------------- FORM AS EXAMPLE 1 ---------------- </cf_cfjq_forms > <div id="ajaxContent"></div>