Data field read only if not empty

4 years 4 months ago #315668 by nancy.aharpour
Data field read only if not empty was created by nancy.aharpour
Hi,
I would like to achieve this:

1) During the Registration, the form displays the Data field but is not Required.

2) if the user sets this field at the Registration then in his/her Edit Profile the Data Field must be read-only (I meant the user cannot change this value anymore but he/she can see it in the Edit Profile Form).

3) if the user didn't provide this field at the Registration, he/she can do it only once in the Edit Profile. Once he/she save the form, he/she can edit this field anymore.

How can I do this? Can you guide me to the right process?

maybe with AutoAction or what?

Thanks
N

Please Log in to join the conversation.

4 years 4 months ago - 4 years 4 months ago #315695 by krileon
Replied by krileon on topic Data field read only if not empty
Use CB Conditional and have the field condition it self, but you'll need to do this with a static condition. The below should work.

Display: Field conditional show
Field: Custom > Value
Custom Value: [FIELD_NAME]
Operator: Empty
Locations
Registration: No
Profile Edit: Yes
Profile View: No
Userlists Search: No
Userlists View: No

Replace FIELD_NAME with the actual name of your field. You may need to turn off value resetting for conditions though. You can do this by editing CB Conditional in CB > Plugin Management and turning of resetting under Parameters.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: sirweb

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.290 seconds

Facebook Twitter LinkedIn