• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Auto Populate Forms

Auto Populate Forms 14 years 3 months ago #12301

Hi, I need assistance in setting up my custom form in RSMembership so that when the customer clicks a check box indicating shipping address same as billing address, the shipping address is automatically populated with the billing address. Very standard in online forms these days, but how can I do this in RSMembership custom form. Thanks for the help..
The administrator has disabled public write access.

Re:Auto Populate Forms 14 years 3 months ago #12302

I found this: Can I get a little assistance on setting this up. How do I go about including a check box to populate the other field? And, will this auto populate the defined fields on the fly?

Thanks



In order to auto-populate a custom field defined for your membership subscription form you will need a custom script in the Values property of the field, for example:
 
//<code>
$db =& JFactory::getDBO();
$db->setQuery("SELECT your_value FROM your_table");
$result = $db->loadResult();
return $result;
//</code> 
 
The administrator has disabled public write access.

Re:Auto Populate Forms 14 years 3 months ago #12317

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

The code grabbed from the documentation will load the value of a field from the DB, when the subscription form is displayed, not when a user clicks on something.

You will have to use Javascript to implement this. You can easily add Javascripts to the membership subscription form by using the "Custom HTML" field type. In the "Values" area you will have to enclose the script between its tags:
<script type="text/javascript">
function copyFields()
{
//...your code here
}
</script>
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!