Skip to Content Skip to Menu

[#8019] Field conditional inconsistency

4 years 6 months ago - 4 years 6 months ago #318584 by jeroen aalders
[#8019] Field conditional inconsistency was created by jeroen aalders
I have added two custom html fields, which both trigger to show according to the same condition.
One of them shows on a tab on the profile view, the other on a tab on the editor.
The problem is that only the one on the profile view shows.
Now, at first, I thought I had messed up with the conditions, but when I copied the field that shows on the profile view and set it to show on the editor, it also failed to show. Even if I set back the copied field back to the profile view, it displays correctly besides the original.
Now, I've spend evenings testing and altering the conditions but without result and now wonder what does this conclusion tell you. It seems it fails to display on an editor tab even thought nothing is changed to the fields characteristics. Perhaps some bug?

I can provide more info on the triggers if you see that fit.

Looking forward to crushing this bug or fixing the problem with your advise.
Last edit: 4 years 6 months ago by krileon. Reason: Added [#8019] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
4 years 6 months ago #318605 by krileon
Replied by krileon on topic Field conditional inconsistency
Likely fails in edit view due to whatever you're conditioning against being unavailable during profile edit. Please provide what your condition is.


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.

4 years 6 months ago #318643 by jeroen aalders
Replied by jeroen aalders on topic Field conditional inconsistency
I want to show a custom html field A when a user has added something on both or on one of the two fields (x & y) and show another B when the user hasn't added anything on these fields

Show A on:
image field x is not empty
and
video field y is not empty
or
image field x is not empty
and
video field y is empty
or
image field x is empty
and
video field y is not empty

Show B on:
image field x is empty
and
video field y is empty

I have exactly the same fields and conditions set to show A or B on profile and this works as intended.

Hope this helps

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
4 years 6 months ago #318659 by krileon
Replied by krileon on topic Field conditional inconsistency
So you've image and video fields conditioning the display of a Custom HTML field? That won't work reliably in profile edit because there's no input value to scan for since the file input is cleared after the upload is completed. The best way to condition against those types of fields is to use a static condition, which can be done as follows.

Field: Custom > Value
Custom Value: [FIELD_NAME]
Operator: Is Not Empty

This won't take affect until the page reloads. On profile the reason why your condition works is because profile conditions don't look for an HTML input to bind to. Profile conditions are actually just forcing the static condition above under the hood.

Have added a feature ticket to see if built in fallback behavior can be added for file type fields.

forge.joomlapolis.com/issues/8019


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.

Moderators: beatnantkrileon
Powered by Kunena Forum