RSjoomla! - Quality Joomla! Components

My Account






Lost Password?
No account yet? Register

Newsletter Subscribe

If you would like to be one of the first people to hear about the release of our new components then make sure you have subscribed to our announcements list! We won't bug you with unnecessary stuff.




RSform!Pro Logo User Guide

Custom code(!) 

RSform! Pro allows you to add your custom PHP code in various parts of you form.

You can define code that will be executed upon form form display. To do this, select the form you wish to customize, go to the Scripts tab and add your custom code in the "Script called on form display " textarea. Please add this script without the PHP delimiters ()

You can also add custom PHP code once the form has been submitted. In order to do that, add the appropriate lines of code in the "Script called on form process ". Once the form is submitted, this piece of code is executed and after that the submissions are added to the database.

Another place where you can insert your code is when using hidden fields.  

Display php variables by default when form is shown [Read All]

With RSform!Pro you can display variables like user information(if the user is logged in) directly in the form components that you create.

Examples:

Assuming that you want to create an e-mail form component, and by default, if the user is logged in, to enter it's registration e-mail in the Email field. Here's how to do it:

  1. Create a textbox component
  2. In the Default Value, type this code:

    //<code>
    $user = $RSadapter->user();
    return $user['email'];
    //</code>

This piece of code (including the //<code> tag) loads the user information in the $user variable. Here's what you can use:

  • $user['id'] = user id
  • $user['username'] = the username
  • $user['fullname'] = registration full name
  • $user['email'] = registration email