Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radio button group - display rule is not working #547

Closed
robbyahn opened this issue Feb 19, 2017 · 5 comments
Closed

Radio button group - display rule is not working #547

robbyahn opened this issue Feb 19, 2017 · 5 comments

Comments

@robbyahn
Copy link
Contributor

@robbyahn robbyahn commented Feb 19, 2017

Hi
It seems like JS bug for only radio button group. it is working fine with checkbox group with display rule.

When there are more than one radio group components. display rule show/hide is not working.

Create radio group A
Create radio group B
Create radio group C
Create radio group D
Then applied display rule in B and D depending on Group A and C's option value.
group A - select option - working fine
group C - radio group D is not appearing whether user choose correct option value.

Thank

@robbyahn
Copy link
Contributor Author

@robbyahn robbyahn commented Feb 19, 2017

Hi

Can I use closest for the radio field on line 506? It is working fine for show and hiding.

case 'HasValue':
if ($checkboxField) {
$expression = '$(this).prop("checked")';
} elseif ($radioField) {
// We cannot simply get the value of the radio group, we need to find the checked option first.
$expression = '$(this).closest(".field, .control-group").find("input:checked").val()=="'. $rule->FieldValue .'"';

@dhensby
Copy link
Member

@dhensby dhensby commented Feb 21, 2017

If it works, then that seems sensible. want to open a PR?

@robbieaverill
Copy link
Contributor

@robbieaverill robbieaverill commented Apr 10, 2017

I can't reproduce the original problem on SS 3.5.3 and userforms 3.2.3 following the steps in this issue's description. For me it works correctly using .parents(..., however the change at #550 also works fine, and is already merged. Closing as fixed.

@wakes
Copy link

@wakes wakes commented May 30, 2017

Hi guys, I've just pulled down 4.2.3 and this doesn't seem to be in there yet, is it possible to get into a 4.2.4 as going to 4.3 right now would be too big a jump? I see #587 is there though so that is great thank you.

@robbieaverill
Copy link
Contributor

@robbieaverill robbieaverill commented May 31, 2017

Fixed in 4.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants