Default value to something when using CB Request field

1 year 1 month ago - 1 year 1 month ago #333046 by activha
OK but when using a CONCAT I can get a nice html display but the value in the drop down uses the plain text
SELECT e.id, CONCAT(e.title, '<br><div id="dropscat" class="d-none">', REPLACE(JSON_EXTRACT(e.params, '$.drophscat'), '"', ''), '</div>') AS title, e.params 
FROM `#__groupjive_plugin_events` AS e 
JOIN `#__groupjive_plugin_events_attendance` AS a ON a.`user_id` = '[user_id]' AND a.`event` = e.`id` 
JOIN `#__groupjive_groups` AS b ON b.`id` = e.`group` AND ( b.`category` = '13' OR b.`id` = '56' ) 
ORDER BY e.`params` ASC

displays : Negopack<br><div id="dropscat" class="d-none">10</div> in the drop down list while the html is correct to Negopack

Is there a solution to force displaying the label in html also in the drop down list ?

I tried [label output="html" /] in the custom label but it does not work

 

Please Log in to join the conversation.

1 year 1 month ago #333048 by krileon
Sorry, I don't have a solution for you then. Currently it's not possible to access columns from the query results outside of the designated value, label, and group columns. Will review adding support for accessing other columns in the query results in the new option display parameter.

forge.joomlapolis.com/issues/9136


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 to join the conversation.

1 year 1 month ago - 1 year 1 month ago #333049 by activha
I have reviewed your issue but it seems that I cannot combine [label] [group] in the the option display rendering
That would be enough if it worked

For instance if I could get this :
[label]<br><div id="drophscat" class="d-none">[group]</div>
That would be perfect to target the id with a js and act accordingly

Please Log in to join the conversation.

1 year 1 month ago #333051 by krileon
Have released a new build that adds support for accessing all the columns of the resulting query in Custom Label, Custom Group, and Option > Display. Also added [group] support to Option > Display. So for example you could query for your extra column and substitute it in using [column_COLUMN] (e.g. [column_html], [column_title], etc..). It will not parse down into params columns so you'll need to handle that yourself in your query if you want to access values in your params column. The entire option display param can also be a language string now for multi-lingual support.


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 to join the conversation.

1 year 1 month ago #333052 by activha
Perfect, exactly what I needed :-)
Thanks a lot
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.231 seconds

Facebook Twitter LinkedIn