Buy Now
Sign in

move read data to text area

MPartales , July 06 at 19:29
Answered
M
MPartales
Hello!
When manually changing a dropdown , I want to select one row in database and take a description field to move in text area.
---------------- Desing -------------
Content = {var:options}
reload event = dynamic
---------------- Setup -------------
Read_Data 18, it works
Designer label : readclasse
Model name : PrimaryDatabase
table : Ark_Classe
Where condition : idclasse:{data:ddclasse}
Select type : Index the results list by one or more
Fields to retrieve : Description
PHP:
$options;​
​$options = $this->get("read_data18", "default");​
​return $options;
Custom code17:
Content : {view:field_textarea5}
My debug after that
debut.PNG
But my field Area are empty ?? but .. Why ?
small precision, I am not a pro of PHP !!
Sorry for my english and thank you for reading me
GreyHead
Hi mikaelpiecoup,
I've never used this combination but I suspect that you need your 'dynamic' event to just return the text string that you need and not an array of results.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
H
healyhatman
Change select type to First result found
In the Value for the field area, put
{var:read_data18}
and get rid of that PHP block.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
M
MPartales
Hi Bob,
Thanks for your reply,
yes, in reality I'm just trying to put a description under the dropdown. The description must be updated each time the dropdown is changed.
I do not know if there is another way to make it easier.
Hi healyhatman,
Thanks for your reply,
with
{var:read_data18}
doesn't work.
But, if i put this here !
Capture1.PNG
I get good value except it's under and not in the field.
Mike
Attachments
Capture1.PNG
Capture1.PNG
(6.09 KiB)
91 Downloads/Views
H
healyhatman
Yes forgot the model.field sorry.
And put it in VALUE not DESCRIPTION
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
M
MPartales
I'm try but it doesn't worksCapture3.PNG
Attachments
Capture3.PNG
Capture3.PNG
(14.27 KiB)
89 Downloads/Views
M
MPartales
maybe overall my solution is not good.
How would you do a dropdown and text link to the dropdown?
H
healyhatman
No no reason it shouldn't work, unless you have your read data set up wrong and it isn't returning anything
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
M
MPartales
For me, my read data is OK.
especially that it works for the description field in the info tab.
Capture.JPG
Attachments
Capture.JPG
Capture.JPG
(45.22 KiB)
94 Downloads/Views
M
MPartales
I'm Tried with "text field" same result
cap.png
a Bug ?
Have you another solution for Link a dropdown and upgrade a text field ?
Attachments
cap.png
cap.png
(22.58 KiB)
73 Downloads/Views
H
healyhatman
If you're putting it in the text field again put it in the VALUE field not description
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
M
MPartales
Yes, I understood, on the screenshot above I put in value.
It was to show that it works in the fields descriptions and tooltip but not value!
H
healyhatman
Works perfectly for me so don't know
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
M
MPartales
for which version ?
for me : Joomla, 3.8.10
version.JPG
Attachments
version.JPG
version.JPG
(34.81 KiB)
57 Downloads/Views
H
healyhatman
OK my bad sorry it's actually not working for me either, I was remembering other scenarios where it did work (dropdowns and on page load). You should let the dev know using the contact link.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
H
healyhatman
I've also made a bug post on the bug forum.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
M
MPartales
I found a solution by a another way
In reload event, i call function PHP like this :
$this->data('text4',$this->data('select2'),true);
the text field is updated every time I change the dropdown.
thank you very much, Heal