Skip to Content Skip to Menu

[#5233] conditional field in backend

  • catalincb
  • catalincb
  • OFFLINE
  • Posts: 60
  • Thanks: 2
  • Karma: 0
9 years 6 months ago - 9 years 6 months ago #262600 by catalincb
[#5233] conditional field in backend was created by catalincb
I have this situations:
a user on registration form or on profile edit: can select a radio button that condtions other text fields.
When choose option 1- some fields are shown
When choose option 2 - some other fields are shown and some are hidden.

Works.

My problems are next:
1- in backend that field is not acting as conditional and shows me all the fields

2 - if a user will edit his profile and wants to choose other option on the radio button in comprofiler table will not be deleted the old values. (strange is that if the user tries to come back at the first option in front end will not see the old values)
and my problem is that i use in other place that cb fields ..all of them and because in database table are not deleted if user choose other option on radio button instead a blank space i have what the user typed before he changed the option.

on short description if i have radio button with option 1 and option 2
on option 1 - shows fields A B C D
on option 2 - shows fields C D E F

i f user select option 1 will complete that fields. he will save and the fields will be completed in comprofiler

if user come back to edit and selects option 2 will be revealed that fields will complete them and will be saved in comprofiler table

In that moment all the fields are completed in comprofiler table. if the user will try to change the options the fields are empty in front end (just play with option 1 or 2). He has to edit again. This is ok ...but if empty in front end ..why not empty in comprofiler table after save ?
Last edit: 9 years 6 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 6 months ago #262616 by krileon
Replied by krileon on topic conditional field in backend
Conditions by default do not function in backend. You can enable this in CB Conditional > Parameters, but I strongly suggest you don't as it makes management of users a bit of a nightmare with fields conditioning away. Value resetting should also be enabled by default within CB Conditional > Parameters as is responsible for resetting the fields value when the condition fails. If it's turned off the value won't reset.

It doesn't particularly matter if the database value isn't emptied as on HTML view CB Conditional will empty the field anyway. CB Conditional doesn't touch the saving process of a field; there's too much risk in breaking a fields save capability. The reason for this is how a field handles being empty is widely different on a field by field basis. At any rate will look into it further for a later release.

forge.joomlapolis.com/issues/5233


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.

  • catalincb
  • catalincb
  • OFFLINE
  • Posts: 60
  • Thanks: 2
  • Karma: 0
9 years 6 months ago #262626 by catalincb
Replied by catalincb on topic conditional field in backend
Ok. thanks

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

Moderators: beatnantkrileon
Powered by Kunena Forum