Skip Navigation

[Resolved] Readonly on user_email doesn't work

This thread is resolved. Here is a description of the problem and solution.

Note:
This issue is a bug. Cred version number 1.6. It will be fixed in future release.

Problem:
When inserting a user_email field in a Cred User Form and checking the 'Readonly' checkbox the expected result on the frontend is not achieved. The user_email field is editable and not greyed out. When submitting the form, the email input is being saved to the user details.

Solution:
A JS workaround is available.
Please see this comment for code:
https://toolset.com/forums/topic/readonly-on-user_email-doesnt-work/#post-381864

This support ticket is created 8 years 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 - -
15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 - -

Supporter timezone: Asia/Jerusalem (GMT+03:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Itamar 8 years ago.

Assisted by: Itamar.

Author
Posts
#381645

I am trying to: create a readonly field on user_email field

I visited this URL:

I expected to see: readonly

Instead, I got: still editable

#381748

Itamar
Supporter

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hello.

I apologize for the delay here.
Only me and one other supporter work on Weekends, specifically, on Sundays.

Could you please elaborate a little more on this read-only issue that you are experiencing so I can better understand?
Could you tell me more about the steps that you had taken before this problem occurred?
Sometimes screenshots illustrating what you mean may go a long way to clarify what words fail to transmit, so if you like, make use of “upload an image” below the comment area.
It would also be helpful if you could share your Debug Information with me?
https://toolset.com/faq/provide-debug-information-faster-support/

If I'm not mistaken, you are experiencing this issue with Cred.
I've tried to replicate your problem in my localhost.
A. I've created a new Cred post form for editing a post.
B. I've inserted into the form a field of post_title type and checked the readonly checkbox.
C. I've put this form into one of my pages and I've tried to edit this field and I couldn't.

Please let me know if I recognized your issue correctly, and if following the above steps you can not achieve the desired results, please don’t hesitate to request my help here in the forum.
I look forward to your reply!

Thanks,
Itamar.

#381781
Untitled2.png
Untitled1.png

Hi, please find attached the screenshot. As you can see, the email field should be grey out just like the username field. There is no error even debug mode is on.

#381864

Itamar
Supporter

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hello, Joe.

Thank you for sharing those details and screenshots with me.
I checked with my local install, and I’m able to replicate this issue on my test site.
Indeed, there seems to be a problem with the user_email field on Cred user forms.

I'll escalate this issue to our developers.
Until I get an answer back from our developers, I would like to suggest to you a workaround for this problem.
Please try this JS code to make the input element of the email field be in a readonly state.

jQuery( document ).ready(function( $ ) {
  id = $('input[name="user_email"]').attr('id');
  $('#'+id).prop('readonly', 'readonly');
 });

You can copy and paste this code into the JS section of the user form and then update the form and check on the frontend if it works for you.

Please let me know if the above solution works for you, I look forward to your reply!

Thanks,
Itamar.

#381893

Thanks Itamar for the workaround. I will use that untill the fix is released.

#381899

Itamar
Supporter

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Thanks Joe for your reply.
I'll keep you posted.
Itamar.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.