ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

move read data to text area

MPartales 06 Jul, 2018
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 -------------
https://forum.joomla.fr/filedata/fetch?id=1984327&d=1530818600
Content = {var:options}
reload event = dynamic


---------------- Setup -------------
https://forum.joomla.fr/filedata/fetch?id=1984328&d=1530818891

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 08 Jul, 2018
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
healyhatman 08 Jul, 2018
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.
MPartales 08 Jul, 2018
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
healyhatman 08 Jul, 2018
Yes forgot the model.field sorry.

And put it in VALUE not DESCRIPTION
MPartales 09 Jul, 2018
I'm try but it doesn't worksCapture3.PNG
MPartales 09 Jul, 2018
maybe overall my solution is not good.
How would you do a dropdown and text link to the dropdown?
healyhatman 09 Jul, 2018
No no reason it shouldn't work, unless you have your read data set up wrong and it isn't returning anything
MPartales 09 Jul, 2018
For me, my read data is OK.
especially that it works for the description field in the info tab.

Capture.JPG
MPartales 09 Jul, 2018
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 ?
healyhatman 09 Jul, 2018
If you're putting it in the text field again put it in the VALUE field not description
MPartales 10 Jul, 2018
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!
healyhatman 10 Jul, 2018
Works perfectly for me so don't know
MPartales 10 Jul, 2018
for which version ?

for me : Joomla, 3.8.10

version.JPG
healyhatman 10 Jul, 2018
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.
healyhatman 10 Jul, 2018
I've also made a bug post on the bug forum.
MPartales 10 Jul, 2018
Answer
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
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com