Skip to Content Skip to Menu

Field doesn't update values in profile display

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
1 year 11 months ago - 1 year 11 months ago #331358 by galanopd
I have an INT_FIELD that updates a TEXT_FIELD when in edit profile.

INT_FIELD is visible in profile edit (not profile display)
TEXT_FIELD is visible in profile display (not edit)

My problem is that when I set the TEXT_FIELD as hidden from edit profile although in console I can see it gets the new values from the  INT_FIELD and then I update the profile with the new values, they are not updated in the profile display (TEXT_FIELD holds the old values).
The same applies when I turn the TEXT_FIELD to read only. In edit profile it shows that it is getting the new values from the INT_FIELD but when I click update profile, in profile display I see the old values.

When I turn the TEXT_FIELD as visible in profile edit, then it updates its values.

How can I turn the TEXT_FIELD to hidden but still get the values from INT_FIELD?
$('input[name=TEXT_FIELD]').val() doesn't solve it.
What attr does it get when I hide it only in edit?
Last edit: 1 year 11 months ago by galanopd.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 11 months ago #331359 by krileon
You can't save a field that doesn't allow saving. Marking it read only or hiding it with CB Conditional will block the save process. That is working entirely as intended. If you have a field that has no save behavior, but you need some sort of logic in it use a Code Field (CB Code Field) or Query Field (CB Query Field) to have custom PHP or SQL ran for whatever display logic you're needing. You can also use substitutions in a Custom HTML field for purely substitution and HTML solution.


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.

Please Log in or Create an account to join the conversation.

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
1 year 11 months ago - 1 year 11 months ago #331365 by galanopd
Replied by galanopd on topic Field doesn't update values in profile display
Ok I understand but I am a bit confused because I have a hidden DATE_FIELD that updates with an AA
Code:
[cb:parse function="date" date-format="Y-m-d" time="false"]now[/cb:parse]
normally (although hidden) in profile edit on onAfterUserUpdate.
So why in this case it works?
Last edit: 1 year 11 months ago by galanopd.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 11 months ago #331382 by krileon
CB Auto Actions pushes directly to the database or user object in its Field action. This process does not care about normal field save behavior. That's why that works.


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: galanopd

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum