[#8019] Field conditional inconsistency

1 week 2 days ago - 6 days 2 hours ago #318584 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.
1 week 3 hours ago #318605 by krileon
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 - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
6 days 21 hours ago #318643 by jeroen aalders
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
6 days 2 hours ago #318659 by krileon
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 - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
Moderators: beatnantkrileon
Time to create page: 0.460 seconds

Facebook Twitter LinkedIn