Forums

Dropdown field not sending value

2D77rus 13 Jun, 2019
I have a pretty simple connection, a form with three fields, and from some moment it stopped returning value from dropdown field. This field gets correct initial value, it shows correct options list, but doesn't return anything.
If I use text field instead of dropdown, it all works.
I've even compared HTML source with another connection that has working dropdown - they seem to be identical.
Tried to re-create dropdown - no luck.
Backup and restore didn't help. Clearing cache didn't help. Upgrade to 6.0.12 didn't help also.

Any ideas? Thank you.


​[file=a]Backup[/file]
[file=sql]sql table description[/file]
​[file=openacc-c6bak]Backup[/file]
healyhatman 14 Jun, 2019
OK so a few things. The way you have it set up all your fields across each repitition all submit to the same plkace and are named the same thing, so there's no way to tell which row you're submitting data on. Your form area needs to either add the id as a URL parameter or you need to name your fields in an array-like fashion, like name[{var:repeater_group.key}]

Also, the value is there for me.

2D77rus 14 Jun, 2019
Answer
Got it working!

This was because a <form> is not allowed to be a child element of a <table>, <tbody> or <tr>. So error was when I tried to use one form across multiple td.
And no problem if repeatedly insert the same form with same static field names - it submits correctly anyway.

By the way, when I tried to add "myform-{var:repeater_group.key}" to Form ID, I found out that this field is not parsed so form id becomes kinda "myform-var-repeater-group-key".
Thanks for your help!
healyhatman 14 Jun, 2019
you shouldn't need to embed a form in every row, the table should have the form option ticked but glad you got it working
This topic is locked and no more replies can be posted.