Textbox

RSform!Pro Text Box form element

Standard HTML input text box with the following configuration tabs:

General
  • Name: the name of the form component. This needs to be unique for each form. It can contain only alphanumeric chars. The name of the field is only used for internal reference - it will not be displayed in the front-end area.
  • Caption: the caption or label is the text or HTML that is being displayed in the actual form.
  • Default value: the value will be automatically filled in when displaying the form. Inside the Default Value area you can use custom PHP codes in between the //<code> and //</code> tags. An example on how to display user related information(if the user is logged in) when the form loads in the frontend can be found here.
  • Description: text/HTML area that provides a description of the field. This can be useful for providing explanations or indications for that particular field.
Validations
  • Required: Yes / No - if this is enabled some text needs to be typed in or a selection to be made.
  • Validation rule: before a form is submitted, the field needs to pass the validation rule.
    • Letters: only standard letters will be accepted
    • Numbers: only numbers will be accepted
    • Letters and numbers: numbers and letters (ASCII standard) are accepted.
    • Letters (+ accented characters): only standard letters and accented ones will be accepted
    • Letters(+ accented characters) and numbers: numbers, letters and accented letters (ASCII standard) are accepted.
    • Email Address: if selected, only email valid email addresses (format wise) will pass the validation rule.
    • Email Address /w DNS check: besides the email address format check, RSform!Pro performs an additional email domain check, thus reducing the chance to validate dummy email addresses.
    • Minimum Length: if this is selected, you'll be prompted with a new 'Length' field where you can add your desired number.
    • Maximum Length: if this is selected, you'll be prompted with a new 'Length' field where you can add your desired number.
    • Unique Field: if enabled, this validation will only allow a field value that hasn't been submitted before, for that particular form.
    • Unique Field per User: if enabled, this validation will only allow a field value that hasn't been submitted before by the logged in user.
    • USA ZIP Code: only valid ZIP numbers (format wise) can be submitted. Valid formats are 5 numeric values only or 5 numeric along with a dash ("-"), followed by another group of 4 numeric values. Examples of accepted formats: "12345", "12345-1234".
    • Phone Number(123-456-7890): only the following phone number format will be validated: "123-456-7890"
    • Credit Card(AMEX/Diners/Discover/Master/Visa): if selected, credit card numbers from the following vendors will be validated: AMEX, Diners, Discover, Master Card and Visa
    • Custom Validation(Characters): use this to create your custom validation rule. An Extra accepted characters field will be available, in which you can add the characters that will be accepted by the validation rule. Typing in characters other than the ones specified here will invalidate the field.
    • Passphrase(Set it in Default Value): the typed in value will be accepted only if it matches with the value specified in the Default Value area. This is often used for password fields, but can be applied for plain text box fields.
    • IP Address: will only validate valid IP addresses. Example: 192.168.1.1
    • Valid URL(only http(s)): will only validate a valid URL. Example: http://site.com, https://site.com/path/here. Note that the protocol specification is required (http/https).
    • Regex: this can be used for more advanced users to create their own validation patterns. Standard regular expressions specifications can be used.
    • Same Value as Other Field: using this will check if two fields have the same value, selecting this validation another field will appear called "Field Name To Compare With" where you can add that field's exact name you want it to compare to.
    • Multiple Rules: this option will allow you to select multiple validation rules for your field. When selecting this, a multiple selection list will be dispayed and you can select your validation rules from this list.
    • IBAN: this validation rule checks if the country code, length, format and checksum are valid.
  • Validation Message: text / HTML area that will allow you to set up a message that will be displayed if the field validation fails.
Note:

The IBAN validation rule works similar as the email address validation rule, it checks the format but it cannot check if the supplied value is an actual working IBAN or not.

Attributes

The Attributes area allows you to add JavaScripts triggers, custom style (for that particular field), impose size restrictions, etc. Anything filled in this area, will be added directly to the HTML tag.

  • Type: Text / Email / Phone / Number / URL
  • Size: Sets or returns the width of a text field (in number of characters)
  • Max size: how many chars can be typed in
  • Placeholder: - this option has been introduced along with RSForm!Pro version 1.51.0 and allows setting up the field's placeholder
  • Additional Attributes: anything filled in this area, will be added directly to the HTML input tag. For example:
    JavaScript: onkeyup="your_function();" - this will trigger a JavaScript function whenever you type in something in that particular textbox.
    CSS: style="color:red" - the text will have a red color.
    Input property: readonly="readonly" - you will not be able to type into it.
Note:

You can find more details regarding the Number Validation Rule in this article


49 persons found this article helpful.


Was this article helpful?

Yes No
Sorry about that