Displaying field's caption within the field


Tutorials - Tutorials

User Rating: / 0
Displaying field's caption within the field

The HTML placeholder attribute can be specified within the Additional Attributes area of the field(eg. placeholder="type your email"). However, within a multi-language website, you may wish to have a different translation.

1. Preparation

We'll use a "textbox" field with the following configuration:

  • First things first, the language for which you edit the form can be changed from the language selector dropdown (located in the upper-left corner while editing a form).
  • You will have to specify for each language of your website a caption on the textbox field(simply change the language, add a caption and repeat this process for every language of your website).
  • Now we can add the following additional attribute to the textbox field:



You will have to replace "my-textbox-name" with the exact name of your field.

2. Script

Add the following script within "Scripts called on form process area" (backend > Components > RSForm!Pro > Manage Form > select your form > Properties > PHP Scripts):

  $formLayout = str_replace($find,$replace,$formLayout);  

Explanation: The script changes the placeholder value with the according caption when the form is displayed.

Tip: Since you'll be using this placeholder attribute approach, the caption of the field (which is added automatically to the form's layout by default) is no longer needed and can be removed by performing layout adjustments(backend > Components > RSForm!Pro > Manage Forms > select your form > Properties > Form Layout).

About Us

Royal Developer Top three Web Designing and Web Development Company in Dehradun, Uttarakhand, India. Royal Developer Best SEO Company in Dehradun takes pride in its philosophy of 'Employee First' which empowers to create a real value for the customers. Royal Developer can offer Best and cheap Website Development Software Development & SEO Services. We are the Best service Provider of SEO, SEM, SMO Services Company in Uttarakhand. Web Designing Course in Dehradun, Web Designing Classes in Dehradun, Web Design Training Institute in Dehradun, Web designing institute in dehradun, Best institute for web designing in dehradun, Web development training in dehradun, Web development course in dehradun, Web Designing Training in Dehradun.


- Contact Information - 

Add : RDIT Services Pvt Ltd, 3rd Floor, RGM Plaza, Above Chandu Canteen,
          23 Chakrata Road, Dehradun - 248001, Uttarakhand, India

Email : nikhil@royaldeveloper.inroyaldeveloper.india@gmail.com 


 : +91 8171200108, +91 8979462451,
                                  +91 7895753921

Quick Enquiry Form

Enter your full name

Enter your valid email address

Enter your correct mobile number

Invalid Input

Your Message
Invalid Input

Enter Code
Enter Code
  RefreshInvalid Input


You are here: Home Tutorials Displaying field's caption within the field