• 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: Default Value based on text field value

Default Value based on text field value 10 years 5 months ago #29449

How can I fill default value of some text field with a data from another text filed submitted by user?
The administrator has disabled public write access.

Default Value based on text field value 10 years 5 months ago #29454

  • fgrun
  • fgrun's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I had the same question - specifically trying to fill the default value of "$ Single Product" with the results of a formula.

Any suggestions ?
The administrator has disabled public write access.

Default Value based on text field value 10 years 5 months ago #29460

  • silviup
  • silviup's Avatar
  • OFFLINE
  • Moderator
  • Posts: 309
  • Thank you received: 49
@ipa-katowice: this can be done using some custom Javascript code. Assuming that you wish to assign the value of "field1" as the value of "field2", please edit "field1" and add the following code in its "Additional Attributes" area:

onblur="changeVal()";

Then, head to the form's "CSS and Javascript" tab and add the following code:
<script type="text/javascript">
function changeVal(){
document.getElementById("field2").value=document.getElementById("field1").value;
}
</script>

Remember to replace "field1" and "field2" with the names of your actual fields.

@fgrun: unfortunately, this is a more complicated scenario, as you will need to not only adjust the value of the single product field, but of the 'Total' field as well (the <span> in which the total is displayed, and the hidden field where the value that gets passed to PayPal gets stored), based on the changes made previously to the single product field.
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.
The following user(s) said Thank You: kawagunax

Default Value based on text field value 10 years 5 months ago #29484

Look Good! Works great!
The administrator has disabled public write access.

Default Value based on text field value 10 years 4 months ago #29696

Works good with a textfield, thanks !

I tried to apply the same code with a calendar field value, but no success until now.

The idea is to copy the date of a "stardate" calendar field to a "enddate" textfield, and then add "x days" to the "startdate" to populate the "enddate". To make it clear, to have enddate = startdate + X days.

Thanks a lot in case you can help about that, I really have no idea how to get it...
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!