I have followed the instructions in the manual at pages 37 - 38.
I have a set of radio buttons (set 1) that decides when another set of radio buttons displays (set 2). In the case that a user selects a different option in set 1, the second set of buttons disappears - that's what I intended - so far so good.
Set 2 has events itself set to display and hide fields.
The issue is that, if the user has selected an option in set 2 to begin with and then they go back and change the option in set 1 that sets set 2 to disappear, if they select the correct option in set 1 to make set 2 reappear again, the items set to display with set 2 do not reappear but the set 2 radio button is already depressed. The only way around this currently is for the user to set the wrong option to select the correct option and they are not going to know to do that and it makes us look very unprofessional.
In short, I need set 2 to have it's selection cleared when a change is made in set 1 so that the correct fields running down the page can be manually activated by the user.
If you want a graphical representation of this please visit https://www.samspencerit.co.uk/
Scroll to the bottom, select the training option and a form will appear.
Select "Individual"
Select "myself" in the second set of radio buttons that appear.
Then select "Business"
Then select "Individual" - you will see that although myself is still populated, the dropdowns are not. I need rid of that dot (in the myself box) in this scenario.
The reload action is supposed to clear that box from my understanding. Is this a bug? Many thanks.
I have a set of radio buttons (set 1) that decides when another set of radio buttons displays (set 2). In the case that a user selects a different option in set 1, the second set of buttons disappears - that's what I intended - so far so good.
Set 2 has events itself set to display and hide fields.
The issue is that, if the user has selected an option in set 2 to begin with and then they go back and change the option in set 1 that sets set 2 to disappear, if they select the correct option in set 1 to make set 2 reappear again, the items set to display with set 2 do not reappear but the set 2 radio button is already depressed. The only way around this currently is for the user to set the wrong option to select the correct option and they are not going to know to do that and it makes us look very unprofessional.
In short, I need set 2 to have it's selection cleared when a change is made in set 1 so that the correct fields running down the page can be manually activated by the user.
If you want a graphical representation of this please visit https://www.samspencerit.co.uk/
Scroll to the bottom, select the training option and a form will appear.
Select "Individual"
Select "myself" in the second set of radio buttons that appear.
Then select "Business"
Then select "Individual" - you will see that although myself is still populated, the dropdowns are not. I need rid of that dot (in the myself box) in this scenario.
The reload action is supposed to clear that box from my understanding. Is this a bug? Many thanks.
Yes it is a bug, it's been mentioned a few times before. Pretty sure the dev knows about it.
Thanks for getting back to me healyhatman, is there any way to get around it in the meantime please? Thanks man.
Add a function after the reload to clear the selection. Should be able to find out how in the Semantic UI documentation.
Thanks for this but I have no idea what I am looking for.
I thought about a function and some JS script - however - calling anything within the events box of the trigger field requires a radio box value, the next radio box needs to be called and this does not leave anywhere for a function to be called.
I did try added an additional event with custom code in it to the trigger field using JS to clear the radio button setting but it didn’t work and I left the reload event code within the radio box field to be changed in trying.
Thanks.
I thought about a function and some JS script - however - calling anything within the events box of the trigger field requires a radio box value, the next radio box needs to be called and this does not leave anywhere for a function to be called.
I did try added an additional event with custom code in it to the trigger field using JS to clear the radio button setting but it didn’t work and I left the reload event code within the radio box field to be changed in trying.
Thanks.
with the latest update a "Reload" will trigger the "change" event of the reloaded fields, so please test this issue again and let me know!
Best regards
Best regards
Afraid it hasn't Max :-)
Is there anything that you want me to be doing differently from what the manual says between pages 37 - 38? I haven't done the little shortcode bit right at the end as I don't understand what it does and I don't think I need it. Just in case and to save you a bit of time i'll Email you a backup of the form set up. For me, I'm trying to use radios_10 (trigger) to reset radios_12 (target).
Thanks again Max!
N.B - When you update on here please would you ping me the briefest of Emails that you have updated this thread alongside the link here - thanks.
Is there anything that you want me to be doing differently from what the manual says between pages 37 - 38? I haven't done the little shortcode bit right at the end as I don't understand what it does and I don't think I need it. Just in case and to save you a bit of time i'll Email you a backup of the form set up. For me, I'm trying to use radios_10 (trigger) to reset radios_12 (target).
Thanks again Max!
N.B - When you update on here please would you ping me the briefest of Emails that you have updated this thread alongside the link here - thanks.
Hi indieben,
Lets say you have 2 fields, a dropdown and a radio, if the dropdown is set to reload the the radio on "change" (of the dropdown) then once the radio is reloaded, a change event will be triggered for the radio IF the radio has any events set!
But if you want to reset the radio selected values, then you need to reset the radios values in the reload event itself, set the $this->data["radio_name"] = null; in a PHP action, this is because the whole form data is passed to the reload event for processing and the new field will get the same value it had before.
Best regards
Lets say you have 2 fields, a dropdown and a radio, if the dropdown is set to reload the the radio on "change" (of the dropdown) then once the radio is reloaded, a change event will be triggered for the radio IF the radio has any events set!
But if you want to reset the radio selected values, then you need to reset the radios values in the reload event itself, set the $this->data["radio_name"] = null; in a PHP action, this is because the whole form data is passed to the reload event for processing and the new field will get the same value it had before.
Best regards
So two questions stem from this,
1) Do I need to remove the current setup as per 37 - 38 of the manual?
2) How do I reference the PHP action in the event?
I presume the custom code block for this also needs to sit in the "setup" area and not the form design view?
Thanks.
1) Do I need to remove the current setup as per 37 - 38 of the manual?
2) How do I reference the PHP action in the event?
I presume the custom code block for this also needs to sit in the "setup" area and not the form design view?
Thanks.
Tried "radios12", "field_radios12" and also "landline_check" in the custom code block of the event:
<?php
$this->data["radios_12"] = null;
?>
{view:field_radios12}
Also set the code up in a PHP Block within the event and I attempted to call it directly - didn't work.
Other setup as above remains the same currently. I'm really stuck and I'm not a coder.
Thanks.
<?php
$this->data["radios_12"] = null;
?>
{view:field_radios12}
Also set the code up in a PHP Block within the event and I attempted to call it directly - didn't work.
Other setup as above remains the same currently. I'm really stuck and I'm not a coder.
Thanks.
Hi indieben,
Your goal is to just reset a radio button when another field value changes, correct ?
Best regards
Your goal is to just reset a radio button when another field value changes, correct ?
Best regards
you’ve got it - other than my conditional logic that is always working ?
thanks!
thanks!
Hi indieben,
Ok, this should be working as expected, in my "custom code" inside the "reload" event of the radios, I used this code:
If this is not working for you then please create a demo form with the 2 fields and attach it here for testing!
Best regards
Ok, this should be working as expected, in my "custom code" inside the "reload" event of the radios, I used this code:
<?phpMy radios are named "radio5" and the view name is "field_radios5", when the radios group is relaoded the selected value is removed.
$this->data["radio5"] = "";
?>
{view:field_radios5}
If this is not working for you then please create a demo form with the 2 fields and attach it here for testing!
Best regards
Hi Max, following several updates, has this been made any easier. If so, what's the updated process please?
Thanks ever so much.
Thanks ever so much.
Hi Indieben,
There is a "Clear value" field event now, did you try it ?
Best regards
There is a "Clear value" field event now, did you try it ?
Best regards
This topic is locked and no more replies can be posted.