Editing a saved form You can edit the forms by clicking on the form's title in the Forms Manager screen. When editing your form, you can change all it's parameters, add / remove / publish / unpublish your fields. You can also use the Copy button to duplicate one or more fields to the same or to other forms. The first thing to do when creating a new form is to give the form a title and a name. Then click on the Apply button, and continue working on your form. This way, you will see the New Field button, only visible when the form has been saved at least once. The Form Title The form title will show up in the front-end. You can make it invisible by editing the form style. More on changing the form appearance here . The Form Name Each form should have an unique form name. The form name is alphanumeric, no spaces. It can be used to identify the form in javascript and also to set up the multi-language . Form Language ISO If you want to enable multiple language forms you must have at least two forms with the same Form Name, but with different Form Language ISO. Here's how to set up the multi-language. Return URL The return url is the URL where the user will be redirected after filling the form. The normal process is: Form Completion -> Form Validation -> Thankyou message(optional) -> Return Url(optional, default is back to form). Learn how to create custom return urls here . In the form style tab you can define the layout of your form. By default, the form has a taular layout. The first column is for the Field title, the second for the Field itself, and the third for the field description if any. Placeholders that you can use in the Form Style: - {formtitle} - will display the value you added in the Form Title field
- {formname} - will display the unique form name you typed in the Form Name field
- {action} - will output the form action page
- {enctype} - if the form contains an upload field, will output enctype="multipart/formdata" needed to enable the handling of files in php
- {formfields} - will output the fields of your form. Each field has it's own field style, so you can customize your form's layout as much as you like.
The Thank You message appears after the user fills the form. It can be customized with your form's fields ids and with global placeholders. For instance you could use something like:
«Dear {firstname} {lastname},
Your information has been successfully stored and you will be contacted shortly.»
Where firstname, lastname are field ids in your form. To make things clear, if your form has these fields: lastname, firstname, email, phone, city You can use the following placeholders: - {lastname} - will output the value that the user typed in the lastname field
- {firstname} - will output the value that the user typed in the firstname field
- {email} - will output the user's email
- {phone} - will output the user's phone
- {city} - will output the user's city
You can also use a number of global placeholders: - {jos_sitename} - will output the name of your site that you configured in Joomla
- {jos_siteurl} - will output the http address of your site
- {jos_userip} - will output the user's IP address
- {jos_user_id} - will output the user's ID if the user is registered, or null if not.
- {jos_username} - will output the user's username if the user is registered, or null if not.
- {jos_email} - will output the user's email address(the one that he configured on registration) if the user is registered, or null if not.
When a user submits your form, you have the option to send him, or to your administrators a notification message. This message can be sent to more than one person at a time. Also this e-mail message can contain all of the data that the customer provided upon ad submission. Just to make you understand better how the Emails tab works, we detailed the guide on each field that you find in the Emails tab. Email Form data toNote that you must type something in the Email Form Data To in order to make the e-mails feature work. Here you can define the recipients of the email. You can add multiple e-mail addresses separated by comma(,). Since you will probably want to send this e-mail to the user that submitted the form, you will have to add here the placeholder {emailaddress} if you have a field in the form with the id=emailaddress. Placeholders that you can use here: If your form has these fields: lastname, firstname, emailaddress, phone, city - {lastname} - will output the value that the user typed in the lastname field
- {firstname} - will output the value that the user typed in the firstname field
- {emailaddress} - will output the user's email
- {phone} - will output the user's phone
- {city} - will output the user's city
Syntax that you could use here: {emailaddress},administrator@mywebsite.com where administrator@mywebsite.com is your own address, if you want to receive a copy. Email form data fromNote that you must type something in the Email form data from in order to make the e-mails feature work. When sending an e-mail, in order to have a reply-to, you must set the Email form data from. This field is generally filled with your default Joomla configuration e-mail. Change it to fit your needs. This field also accepts placeholders, so you will be able to type {emailaddress} if your form contains an "emailaddress" field id. Email From NameNote that you must type something in the Email From Name in order to make the e-mails feature work. By default this field is filled with the name of your website defined in the Joomla Configuration. If your form has these fields: lastname, firstname, email, phone, city You can use the following placeholders: - {lastname} - will output the value that the user typed in the lastname field
- {firstname} - will output the value that the user typed in the firstname field
- {email} - will output the user's email
- {phone} - will output the user's phone
- {city} - will output the user's city
You can also use a number of global placeholders: - {jos_sitename} - will output the name of your site that you configured in Joomla
- {jos_siteurl} - will output the http address of your site
- {jos_userip} - will output the user's IP address
- {jos_user_id} - will output the user's ID if the user is registered, or null if not.
- {jos_username} - will output the user's username if the user is registered, or null if not.
- {jos_email} - will output the user's email address(the one that he configured on registration) if the user is registered, or null if not.
Email Subject This is the e-mail subject. Note that you must set a subject in order to make the e-mails feature work. It can be customized with your form's fields ids and with global placeholders. Email Mode This switch tells the Mail send function whether to send the e-mail in text format or in html format.
Email TextNote that you must NOT leave this field empty in order to make the e-mails feature work. This is the body of your email. It can be customized with your form's fields ids and with global placeholders. For instance you could make it something like:
«Dear {firstname} {lastname},
Your ad has been successfully stored and we will review it.»
Where firstname, lastname are field ids in your form.To make things clear, if your form has these fields: lastname, firstname, email, phone, city You can use the following placeholders: - {lastname} - will output the value that the user typed in the lastname field
- {firstname} - will output the value that the user typed in the firstname field
- {email} - will output the user's email
- {phone} - will output the user's phone
- {city} - will output the user's city
You can also use a number of global placeholders: - {jos_sitename} - will output the name of your site that you configured in Joomla
- {jos_siteurl} - will output the http address of your site
- {jos_userip} - will output the user's IP address
- {jos_user_id} - will output the user's ID if the user is registered, or null if not.
- {jos_username} - will output the user's username if the user is registered, or null if not.
- {jos_email} - will output the user's email address(the one that he configured on registration) if the user is registered, or null if not.
The scripts tab is very useful for integrating RSform! with some external application. This should be used by experienced programmers only. The Script called on form display is a php code that you can run whenever the form is displayed. You could auto-populate a selectbox with usernames for instance. The Script called on form process is a php code that you can run whenever the form is processed. This means that this script will run on form display also. If you want to trigger it only when the submit button is pressed, you should put it all under the condition: if(isset($_POST['form'])){ your php code } Note that PHP scripts must be added without <?php and ?>. Script called on form display Here's an example of how you can get the users and load them in a select box (field id = select1): Edit your form, go to Scripts and paste this code in Script called on form display : $database->setQuery("SELECT username FROM #__users"); $data = $database->loadObjectList();//we load the usernames foreach($fields as $i=>$field){ if($field->name=='select1'){//cycle through the fields, and find our select box field $string = array(); if(!empty($data)){ foreach($data as $data_row){ //prepare the default syntax which will be value1|label1,value2|label2 $string[] = $data_row->username.'|'.$data_row->username; } } $string = implode(',',$string); $fields[$i]->default_value = $string; } } Script called on form process This script will be called whenever someone processes the form. Take a look at the Custom Scripts and customization examples chapter . |