How to copy information from other fields


Tutorials - Tutorials

User Rating: / 0
How to copy information from other fields

In this article we will provide a quick implementation for the following type of scenario: copying information like first name, last name and address from one form section - Billing Details, to another - Shipping Details.

The article consists in a step-by-step guide to implementing this, but you can also download the sample form by clicking on the button to the right.

Form Fields

Add, to your form, the following textboxes:

Internal NameCaption
billingfirstname First Name
billinglastname Last Name
billingaddress Address
shippingfirstname First Name
shippinglastname Last Name
shippingaddress Address

Also, add a radio group containing the following items:

  • Same as Billing Information
  • Different Shipping Information

In the radio group's "Attributes" tab, add onclick="copy();" in the "Additional Attributes" field. This will trigger the actual Javascript function that will copy the fields information.


To copy the information typed in the billing fields, we will be using the following Javascript code:

  <script type="text/javascript"> function copy(){ if (document.getElementById("copy0").checked==true) { document.getElementById("shippingfirstname").value=document.getElementById("billingfirstname").value; document.getElementById("shippinglastname").value=document.getElementById("billinglastname").value; document.getElementById("shippingaddress").value=document.getElementById("billingaddress").value; }   else if (document.getElementById("copy1").checked==true) { document.getElementById("shippingfirstname").value=""; document.getElementById("shippinglastname").value=""; document.getElementById("shippingaddress").value=""; } } </script>  

Copy this code and paste it in Components >> RSForm!Pro >> Manage Forms >> edit your form >> Properties >> CSS and Javascript >> Javascript tab.

The code will verify if the Same as Billing Information radio option is checked and, if it is, will copy the text that the user typed in the billing fields to the shipping fields. If the Different Shipping Information option is checked, the shipping fields will be cleared.

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 ServicesCompany 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 : 


 : +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 How to copy information from other fields