I can't insert matching instruction in value field. Have field empty or with some html taags. When I write to: {user:id} it shows me number of user id - is ok, when try with function empty - it's ok - return 1. I tryed for many options and don't have idea how use data from read data query. Please help!
Hi pachf11,
First, the read data must be BEFORE the "display section", then you can use a "Debugger" to display what data is available for usage, the data of any action is available under {var:action_name}, but the exact path is visible in the debug output.
Please check the manual or post the debug results and I can explain how to find the path.
Best regards,
Max
First, the read data must be BEFORE the "display section", then you can use a "Debugger" to display what data is available for usage, the data of any action is available under {var:action_name}, but the exact path is visible in the debug output.
Please check the manual or post the debug results and I can explain how to find the path.
Best regards,
Max
Hi Max
I have readdata on first position, second is display. I used debugger and found interesting me data. This is from the debugger:
END DEBUG
I tryed {data:xxx} and {var:xxx} but couldn't find resolve.
Thank You
Paweł
I have readdata on first position, second is display. I used debugger and found interesting me data. This is from the debugger:
Array
(
[language] => pl-PL
[format] => html
[Itemid] => 453
[option] => com_content
[lang] => pl-PL
[view] => article
[id] => 11
[ark_inine_enabled] => 1
[arkoption] => com_content
[com_content.article.-1289027624] => 1
)
Array
(
[read_data9] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`CH_MODEL_USER`.`virtuemart_userinfo_id`) AS `CH_MODEL_USER.count` FROM `joom_virtuemart_userinfos` AS `CH_MODEL_USER` WHERE `CH_MODEL_USER`.`virtuemart_user_id` = '907';
[1] => SELECT `CH_MODEL_USER`.`title` AS `CH_MODEL_USER.title`, `CH_MODEL_USER`.`first_name` AS `CH_MODEL_USER.first_name`, `CH_MODEL_USER`.`last_name` AS `CH_MODEL_USER.last_name` FROM `joom_virtuemart_userinfos` AS `CH_MODEL_USER` WHERE `CH_MODEL_USER`.`virtuemart_user_id` = '907' LIMIT 30;
)
[var] => Array
(
[0] => Array
(
[CH_MODEL_USER] => Array
(
[title] =>
[first_name] => Paweł
[last_name] => Chojaczyk
)
)
)
)
)
END DEBUG
I tryed {data:xxx} and {var:xxx} but couldn't find resolve.
Thank You
Paweł
Hi Pawel,
In order to get the first_name from the data you need to use the following:
But if you are planning to load ONE record only then you better set the "Select type" in the "Read data" to "First matching", you can then use:
Best regards,
Max
In order to get the first_name from the data you need to use the following:
{var:read_data9.0.CH_MODEL_USER.first_name}
But if you are planning to load ONE record only then you better set the "Select type" in the "Read data" to "First matching", you can then use:
{var:read_data9.CH_MODEL_USER.first_name}
Best regards,
Max
Great! Now it's function OK. Thank You very much!
Best Regards
Paweł
Best Regards
Paweł
I am having this same issue and I think I have the syntax correct but my field is still blank. On my form I have a drop down that selects a users name. Then I have an event that reads the data (selecting 1st matching record). According to the debug it is finding the record I expect but it is not populating the next field with the value. Any thoughts on what I have wrong based on the debug and field syntax below:
{var:read_data10.JMUSERID.jmid}
I would expect it to be 58 but it remains blank. thoughts?
Array ( [read_data10] => Array ( [log] => Array ( [0] => SELECT `JMUSERID`.`aid` AS `JMUSERID.aid`, `JMUSERID`.`jmid` AS `JMUSERID.jmid` FROM `film_vw_users` AS `JMUSERID` WHERE `JMUSERID`.`aid` = '2' LIMIT 100; ) [var] => Array ( [JMUSERID] => Array ( [aid] => 2 [jmid] => 58 ) ) ) )The Value of the field I want to populate is
{var:read_data10.JMUSERID.jmid}
I would expect it to be 58 but it remains blank. thoughts?
Hi vividal,
I'm not clear where these things are happening. Is the read data after the first part of the form (with the drop down) is submitted?
Bob
I'm not clear where these things are happening. Is the read data after the first part of the form (with the drop down) is submitted?
Bob
Sorry for the confusion. The form has 5 fields (fields 3-5 work fine). Field1 (filmuser_id) is a drop down where I select the a value. It has a reload action on change for element id jmid1. Field 2 (jmid1) has a reload event GetJMID which is where the debug is displayed after loading the value based on the selection from field1.
Hi,
The syntax of the shortcode is correct, but the read data should be inside the same event of the "reload" and BEFORE the "custom code" action used to render the field.
You may also try to call the shortcode directly from the "custom code" {var:read_data10.JMUSERID.jmid}
Best regards,
Max
The syntax of the shortcode is correct, but the read data should be inside the same event of the "reload" and BEFORE the "custom code" action used to render the field.
You may also try to call the shortcode directly from the "custom code" {var:read_data10.JMUSERID.jmid}
Best regards,
Max
Oh, it works now.
Earlear, i tried to use this command into wrong place (in text field of form, but display section function is into success event of read data function) it is the reason could't output the data as i think
Earlear, i tried to use this command into wrong place (in text field of form, but display section function is into success event of read data function) it is the reason could't output the data as i think
Hello to all >
Max,
Is this all written above still apply with the latest CF6 update ? I cannot get why I cannot populate text field with the instructions above .
To reload the text field I have a standalone action named load_katUCI with [read_data255] action and custom code with following code inside:
However I cannot get the needed data INSIDE THE TEXT FIELD.
Funny thing is that I can get that value to be printed OUTSIDE the text field, as my debug shows🙂 when I enter the following code AFTER the view code. Any ideas?
Max,
Is this all written above still apply with the latest CF6 update ? I cannot get why I cannot populate text field with the instructions above .
To reload the text field I have a standalone action named load_katUCI with [read_data255] action and custom code with following code inside:
{var:read_data255.model.katUCI}Read function works as expected (see Debug below).
{view:field_text987}
However I cannot get the needed data INSIDE THE TEXT FIELD.
Funny thing is that I can get that value to be printed OUTSIDE the text field, as my debug shows🙂 when I enter the following code AFTER the view code. Any ideas?
after texfield view: {var:read_data255.model.katUCI}

Sorted that out using this thread:
http://www.chronoengine.com/forums/posts/t107640/populate-field-value-after-selecting-value-in-dropdown?keywords=dynamically%20populate%20text%20field
- I had an php action code missing.
that is a litle bit weird though🙂 - is this the correct way of doing this, Max?
Thanks!
http://www.chronoengine.com/forums/posts/t107640/populate-field-value-after-selecting-value-in-dropdown?keywords=dynamically%20populate%20text%20field
- I had an php action code missing.
that is a litle bit weird though🙂 - is this the correct way of doing this, Max?
Thanks!
This topic is locked and no more replies can be posted.