entry "select from list" depending "on radio group" in manage records

  • Karlheinz68
  • Karlheinz68's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Patron (Hero Patron)
  • Posts: 21
  • Thank you received: 1

Karlheinz68 created the topic: entry "select from list" depending "on radio group" in mana

I have a form - radio group makes an area visible - in this area is a selection from the list. - works -

Problem:
If I choose "No" and submit the form - in "Manage Records", select Team "No" and Team is empty - that's fine.

If I choose "Yes" first and choose a team (and that's not right) and then choose "No" and submit the form - in "Manage Records" the entry is NO and the entry in TEAM is for example TEAM 5 - The Entry in TEAM should also be empty!

Hope my question is understandable

thx
karlheinz68

thx
karlheinz1968
#238452
Attachments:
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2738
  • Karma: 93
  • Thank you received: 369

mihaela replied the topic: entry "select from list" depending "on radio group" in mana

Hello,

I have answered on the ServiceDesk ticket that you have raised, but here is my response as well.

I understand the issue that you are having. When the field becomes hidden it stays filled in (in case it was filled in before).

Here is how you can resolve this.

Go to the Advanced properties of the "choose team" radio group and in the Actionscript section set Type to Custom and Action to Change.

In the code area below that appears put the following code:
function ff_radiogroupname_action(element, action)
{
    if( jQuery('[name="ff_nm_radiogroupname[]"]:checked').val() == "no" ) {
        ff_getElementByName('selectlistname').selectedIndex= 0; }
} // ff_radiogroupname_action
NOTE: In the code below replace "radiogroupname" with the Name of the radio group element and "selectlistname" with the name of select list.

That should do the trick.

Let me know whether you have managed to adjust this for your form and whether it is working as you wanted.

Regards,

Mihaela
#238460
The following user(s) said Thank You: Karlheinz68
  • Karlheinz68
  • Karlheinz68's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Patron (Hero Patron)
  • Posts: 21
  • Thank you received: 1

Karlheinz68 replied the topic: entry "select from list" depending "on radio group" in mana

@mihaela
Thanks - works perfectly
Example form in the attachment


visible rule:

turn on element select_team if radioelemteam is yes
turn off element select_team if radioelemteam is no


action script: choose team (change)

function ff_radioelemteam_action(element, action)
{
if( jQuery('[name="ff_nm_radioelemteam[]"]:checked').val() == "no" ) {
ff_getElementByName('select_team').selectedIndex= 0; }
} // ff_radiogroupname_action
#238466
Attachments:
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2738
  • Karma: 93
  • Thank you received: 369

mihaela replied the topic: entry "select from list" depending "on radio group" in mana

Hello,

I'm glad that this solution is working for you. :)

Thank you for sharing the solution with the community.

Regards,

Mihaela
#238467
Moderators: ForumSupporttomeperica
Time to create page: 0.057 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here