• 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: Using {xx:caption} to empty fields

Using {xx:caption} to empty fields 12 years 3 weeks ago #17181

  • Stf
  • Stf's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi,

I've a form translated into several languages and I would need to find a universal way to empty fields value when a field is focused.
In my html fields I'm using the following javascript:
onfocus="if(this.value=='Name'){this.value=''}" onblur="if(this.value==''){this.value='Name'}"

What I would need, is to be able to use the {xx:caption} (where xx is my fiels value attribute value) tag so that my javascript actions work on all my forms.
The value being different depending on countries.

I've tried different things but none worked.
Such as:
onfocus="if(this.value=="+ {xx:caption} +"){this.value=''}" onblur="if(this.value==''){this.value="+ {xx:caption} + "}"

or
onfocus="if(this.value=="'+ {xx:caption} +'"){this.value=''}" onblur="if(this.value==''){this.value="'+ {xx:caption} + '"}"

Each time {xx:caption} shows up as a string and is not considered as a variable.

An idea ?

Thanks,
Last Edit: 12 years 3 weeks ago by Stf.
The administrator has disabled public write access.

Re: Using {xx:caption} to empty fields 12 years 3 weeks ago #17195

Hi,

I just use the javascript action in the attribute field in every language.
This works perfectly and you only have to do this once.
Regards
Wilco Alsemgeest

Please note: my help is not official customer support. To receive your support, submit a ticket by clicking www.rsjoomla.com/my-support-tickets.html
The administrator has disabled public write access.

Re: Using {xx:caption} to empty fields 12 years 4 days ago #17374

  • Stf
  • Stf's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi Wilco,

Sorry for getting back to you so late and thanks for your answer.
Sure we can do that, but the idea was to find out is there was an other (faster way) to do that.
By using variables for examples ?

Thanks
The administrator has disabled public write access.

Re: Using {xx:caption} to empty fields 12 years 3 days ago #17382

  • Stf
  • Stf's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi Wilco,

Could you be more specific ?
Because the attribute field can't be localized.
If you modify the field, you modify it for all the languages.

Thanks,
Last Edit: 12 years 3 days ago by Stf.
The administrator has disabled public write access.

Re: Using {xx:caption} to empty fields 11 years 11 months ago #17471

Hello,

Indeed i just tested it and it changes in every language.
Then I don't know how to do this.
Regards
Wilco Alsemgeest

Please note: my help is not official customer support. To receive your support, submit a ticket by clicking www.rsjoomla.com/my-support-tickets.html
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!