• 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: Setting the value of a Free Text component

Setting the value of a Free Text component 13 years 4 months ago #7293

  • rhellyer
  • rhellyer's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I would like to be able to set the value of a free text component programatically ... i can do this with input fields such as text box, by adding the php code to the default value, but I can't see a way to do that for freetext values.

many thanks in advance!
The administrator has disabled public write access.

Re:Setting the value of a Free Text component 13 years 4 months ago #7294

  • bogdanc
  • bogdanc's Avatar
  • OFFLINE
  • Moderator
  • Posts: 669
  • Thank you received: 11
Hello Mario,

You can customize the FreeText field using the Scripts tab, namely "Script called on form display".

First of all you have to create a FreeText component and in the Text field type an unique placeholder like: {my_free_text}.

Then go to the "Script called on form display" and type this code:
$formLayout = str_replace('{my_free_text}','your value here',$formLayout);

I hope this helps.
The administrator has disabled public write access.
The following user(s) said Thank You: oorzaak
  • 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!