Skip Navigation

[Resolved] Optional Change Password Conditional Not Working as Expected

This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 7 replies, has 2 voices.

Last updated by Nigel 6 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1144750
conditional based on generic radio button field.png

I am trying to: Have a 'Change Password' No/Yes Radio button appear on a user profile edit form/page, and then when they select Yes, have the new password and confirm password fields appear. The radio button is a cred generic field.

Link to a page where the issue can be seen: hidden link

I expected to see: Expected it to work, followed this support ticket: https://toolset.com/forums/topic/optionally-change-password-when-editing-profile/. In fact, I thought I had it working at one point, but something has broken it. I did add a function to ensure the password is at least 8 characters, but not sure what else has broken it. Oddly, if I submit with less than 8 characters (when the password fields do show) I also get some weird behaviour with the form doubling on-screen when it shows the error. As per your suggestion last week (for another support ticket), I removed the View out of the picture, as it was originally what was including the cred form. Now the CRED form is just on the page it is shown.

Instead, I got: The fields don't show off and on, but if I submit after 'Yes' is selected they will then show. Very strange.

User form: Update Profile Form
Page: hidden link (use the member login to test)

#1144992

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Mark

I have a very similar set up on a local test site, and it works.

When I use the browser dev tools I can see that on my site there are event listeners added to the radio inputs (used to trigger changing the visibility of the hidden block), but on your site these same event listeners are entirely missing.

I notice that your Toolset plugins are out of date, and before proceeding I'll need you to update to the current versions.

Take a backup before you do, and when you have updated, see if that makes any difference and let me know.

#1145072

Hey Nigel,

That didn't seem to work I am afraid.

I think since I am not using Views anymore (we discussed this in a separate ticket), that the eventlistener JS is not being rendered, preventing this from working as normal. I have the shortcode added to the Beaver buiilder page directly.

Thoughts?

-Mark

#1145073

By that, I mean I updated the plugins to latest version, and it doesn't seem to have resolved the issue.

#1145099

Hey Nigel,

Having trouble 'editing' my posts here (clicking edit just leads to an 'Edit Reply' page with no option to edit). Sorry for the multiple replies.

I added another page /update-profile-testing/, without Beaver Builder involved, and the form is doing the same thing.

-Mark

#1145105

One other test using a view again (not working): /update-profile-test-with-view/

#1145135

Nigel, I got this working. A broken closing label tag seemed to be causing the issue.

Sorry for the hassle here, but I think we are all good.

-Mark

#1145140

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, great, thanks for updating.