You need a Query Select field to refresh its display when another fields value changes (should work) or your need a Query field to refresh its display when a Query Select field refreshes its display (may not work)? Sorry, not following how your fields are chained together.
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.
Yes you're right I didn't explain to you all my scenario.
My scenario is this
I want to create a Query Field with this query:
SELECT a.*, b.firstname, b.lastname, c.username FROM `#__comprofiler_views` AS a
LEFT JOIN `#__comprofiler` AS b ON b.id = a.profile_id
LEFT JOIN `#__users` AS c ON c.id = a.viewer_id
WHERE `profile_id` [ here goes the user_id from a select drop down]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I want that a Query Drop Down Field passes a user_id selected by the user in the front end to this query
but this passes dynamically variable between two or more Drop Down Query Field, I need to pass a variable from 1 - Drop Down Query Field --> to Query Field
That'll work fine, but the problem is profile edit will suppress empty fields. So if the query field is initially empty on profile edit display then the field won't display at all for it to ajax update. You can work around this by adding to the layout to force it to output something at all times using the below.
Profile Edit Value Layout
Code:
<div>[value]</div>
This should ensure the query field always displays on profile edit even if it's empty. Next just be sure to configure the Update On under Integrations > CB Core Fields Ajax for that same query field and it should refresh its display when the dependent fields value changes. I've confirmed the works using the following.
Query:
Code:
SELECT `username` FROM `#__users` WHERE `id` = '[FIELD_NAME]'
Output: Single Row
Columns: Single Column
Update On: FIELD_NAME
This will display the username matching the user id from FIELD_NAME for example.
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.