Forums

accessing select element V4 [Solved]

tibi38 27 Jan, 2012
Dear,
I add a select - field in a custom routine (like dynamic load).
Now I like to access the result in a custom code in the submit.
How can I get the element selected?
thanks for support
Thomas
GreyHead 27 Jan, 2012
Hi Thomas,

In the same way as any other input. Use the input name in {input_name} or in $form->data['input_name']

Bob
tibi38 29 Jan, 2012
Dear Bob,
that was my though too. But I get nothing back.
I tried it too with the debugger, but the element is not list there.
Is there something what I have to keep in mind by coding the dynamic load?
Best regards
Thomas
GreyHead 30 Jan, 2012
Hi Thomas,

I don't think so - as long as it is valid HTML.

Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here. Note: if you are using the Easy Wizard you may need to switch to the Advanced Wizard to do this; if you want to continue to use the Easy Wizard please make a copy of your form first and add the Debugger action to the copy.

Bob
tibi38 30 Jan, 2012
Hello Bob,

here is the Debug output:
(The form i send by pn)
Data Array:

Array
(
[Bearbeiten] => Bearbeiten / Anlegen
[user_id] => 62
[give_back] =>
[6f542fd761d16c8a91b0cf87051f2721] => 1
[option] => com_content
[view] => article
[id] => 34
[Itemid] => 33
[lang] => de
[chronoform] => objekt_aussuchen
[event] => submit
)

Debug Data

Best regards
Thomas
GreyHead 31 Jan, 2012
Hi Thomas,

I think I've solved this.

Using a Custom Code action to create the HTML works OK . . . BUT the resulting HTML appears before the <form> tag and so isn't included in the form results.

Use a Custom Element element in the Preview box instead. Putting the same code there works correctly*.

Bob

* There is one bug that needs fixing - you are missing the $ before $obj_element in the line of your code that sets the drop-box size.
tibi38 31 Jan, 2012
Dear Bob,
Thanks a lot for yout great support. Now it's working well.
And I also get a better understanding of how the system works.
Thanks a lot again.
best regards
Thomas
This topic is locked and no more replies can be posted.