Forums

How to fill a text box ( or two or three ) with the information from a dropbox?

AntonioGraca 15 Feb, 2014
Hello Bob

I can populate a dropbox with information from other dropbox. But how to fill a text box ( or two or three ) with the information from a dropbox?
I have a dropbox connected to a DB Multi Record Loader event to list data. Now I need to, after selecting the data that dropbox, fiil a textbox ( or two or three text box), with data filtered by a DB Record Loader .

On load I have a Dynamic Dropdown ( but I think to fill a textbox does not need, am I right? )

On ajax load have DB Record Loader ( with code to FIND the record according to selection dropbox ) . And I have the following code in custom code


< ? php
$ results = array ( ) ;
$ results [ ] = '= Select Tier ' ;
$ selected = " selected = 'selected ' " ;

foreach ( $ form - > data [' escalao_source_ajax '] as $ v ) {
$ results [ ] = $ v [' escalao_epocas '] '=' $ v [' escalao_epocas .'] . ;
}
$ results = implode ( " \ n" , $ results ) ;
echo $ results ;

$ mainframe = & JFactory :: getApplication ( ) ;
$ mainframe - > close ( ) ;
?>


1 - What do I need to change this code to populate a textbox ( two or three ) ?
2 - I have in mind that just need a registration , is straightforward to use use the DB Record Loader instead of DB Multi Record Loader?


Thanks
AntonioGraca 15 Feb, 2014
Sorry, calculus00
but, in this time, you did not help. I'll wait for a more "powerful" help. But

Thanks calculus00
AntonioGraca 17 Feb, 2014
Hi Bob
Another solution was to add a button, with a custom code, for populate these fields (textBox). How can I add a second Button and associate it with a 2nd event? (On Submit2, for example).

Thanks
alissonjc 22 Mar, 2014
HI Antonio,
For your second question just put a name in ID field of Submit button and add a OnClick event in your code...When press the button Submit will trigger a event.
This topic is locked and no more replies can be posted.