Adriano Faria Posted April 13, 2018 Posted April 13, 2018 I'm testing a couple of plugins in 4.3.0 and the members fields shows up like that: This is the field. $form->add( new \IPS\Helpers\Form\Member( 'followers_member', NULL, FALSE ) ); If I set it to be required, it shows "open". I believe this is happening due to the changes made on TAGs, which uses same classes somehow (JS, etc). Obviously this is not the intended behaviour for the MEMBER field as my field cannot be required. Can you confirm this is right or wrong? I mean, it will be this way now? Testing a bit more, it seems that it had some change. I mean, even I choose GROUP above and submit the form, it won't stop even MEMBER being required. If it's like that now, then it's ok. Can anyone confirm? -- Beta 3 yet. --
bfarber Posted April 13, 2018 Posted April 13, 2018 Our form handler values() method explicitly ignores fields hidden due to toggles, so you should be able to set the member field required in this instance.
Adriano Faria Posted April 13, 2018 Author Posted April 13, 2018 1 minute ago, bfarber said: Our form handler values() method explicitly ignores fields hidden due to toggles, so you should be able to set the member field required in this instance. This is new in 4.3? I don't remember this before.
bfarber Posted April 13, 2018 Posted April 13, 2018 Just now, Adriano Faria said: This is new in 4.3? I don't remember this before. No, it's been there a while (I don't remember when it was added exactly). Keep in mind I haven't tested this specific scenario, but we've had issues in the past where a field would throw an error for some reason (required but not filled in, invalid value, etc.) but the field was hidden because it was toggled by another field, so the form just wouldn't submit and the user had no idea why. Thus, we added code in the values() method to ignore fields not currently visible.
HeadStand Posted April 13, 2018 Posted April 13, 2018 4 hours ago, Adriano Faria said: This is new in 4.3? I don't remember this before. Ditto. This is definitely still an issue in 4.2.
Adriano Faria Posted March 6, 2019 Author Posted March 6, 2019 On 4/13/2018 at 10:30 AM, bfarber said: No, it's been there a while (I don't remember when it was added exactly). Keep in mind I haven't tested this specific scenario, but we've had issues in the past where a field would throw an error for some reason (required but not filled in, invalid value, etc.) but the field was hidden because it was toggled by another field, so the form just wouldn't submit and the user had no idea why. Thus, we added code in the values() method to ignore fields not currently visible. Brandon, have this changed on IPS 4.4? I have a required hidden field tied to a YES/NO and I got a error message when I submit the form without fill the field:
bfarber Posted March 6, 2019 Posted March 6, 2019 Assuming you're just using the "required" parameter, no nothing changed. It should work the same as before. You can submit a ticket with a copy of the plugin for testing if it's not working.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.