<field
name="text"
type="radio"
onchange="this.form.submit();"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
onchange="this.form.submit();" should submit the form and the toggled radio button should be selected
nothing happens, js event did trigger
Joomla! Version | Joomla! 4.0.0-beta1-dev Development [ MaƱana ] 17-October-2019 20:21 GMT
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0
Labels |
Added:
?
|
Yeah, did work by adding to option, but thats not clear and too much if you have a large list of options.
Anyway thanks for that info, but someone should fix it.
Well, there's an advantage to having this on options - each option can have a different onchange value.
I don't think it's an advantage. It should be possible to set the handling onchange for all fields equally. If someone else wants to handle it different, he can write a separate field for it.
As @SharkyKZ pointed out, you can add onchange to individual option. From documentation of our radio form field, onchange is not a supported attribute too. For the time being, it is not really an issue, I'm converting it to discussion and we can discuss further from there if needed.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-11-12 10:23:09 |
Closed_By | ⇒ | joomdonation | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
Looking at the code,
onchange
should be added to each individual option like this:It's the same in J3. But different for
switcher
layout in J4.