• 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: How to set radio option from database fie

How to set radio option from database fie 7 years 6 months ago #37469

  • tomr5
  • tomr5's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
How do i set a default radio option when loading the form from an external database field?

I have a radioset with 2 options:

1|option 1
2|option 2

Based on a database field from the logged in user ( Easy Profile field ) I want to select on of the options.

I guess I have to dynamicly set the Items in 'Script called on form display 'of my Radio to:

1|option 1[c]
2|option 2

or

1|option 1
2|option 2[c]

But how do I assign it to the Items section of Radioset?
Last Edit: 7 years 6 months ago by tomr5.
The administrator has disabled public write access.

How to set radio option from database fie 7 years 6 months ago #37470

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

You can place PHP code within the Default Value area of your radio group (the code will have to be enclosed using //<code> and //</code> tags), basically generating the items there. When doing so, you can also add the [c] syntax to the item in question accordingly.

An example is provided here.
This is not official customer support. To receive your support, submit a support ticket here.
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!