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

toggle not work #33

Open
attreid opened this issue Apr 24, 2017 · 2 comments
Open

toggle not work #33

attreid opened this issue Apr 24, 2017 · 2 comments

Comments

@attreid
Copy link

attreid commented Apr 24, 2017

$form->addCheckbox('check')
	->addCondition($form::EQUAL, true)
	->toggle('checked');
$form->addText('input')
	->setOption('id', 'checked');

This code work with original netteForms.js

@attreid
Copy link
Author

attreid commented Apr 24, 2017

Update: its not problem with toggle, but when I use jquery 3, sometimes live validation work and sometimes not.

@FTCP
Copy link

FTCP commented May 5, 2021

Update: its not problem with toggle, but when I use jquery 3, sometimes live validation work and sometimes not.

I am using jquery 1.12.4 and toggle still doesn't work

for example multi toggle doesn't work at all, only one toggle will be showns / hidden.

->addCondition($form::EQUAL, TRUE)
->toggle('frm_confirm_yes',FALSE)
->toggle('frm_u_businessName')
->toggle('frm_u_firstName')
->toggle('frm_u_lastName');

only 'frm_confirm_yes' hides and the rest stay hidden.

EDIT: problem occurs when you use one or more toggles to hide and others to show or vice versa

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

No branches or pull requests

3 participants