Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwitchInput::RADIO PROBLEM #390

Open
mguandiquebcosv opened this issue Sep 26, 2024 · 0 comments
Open

SwitchInput::RADIO PROBLEM #390

mguandiquebcosv opened this issue Sep 26, 2024 · 0 comments

Comments

@mguandiquebcosv
Copy link

mguandiquebcosv commented Sep 26, 2024

Hi, I have a problem with SwitchInput::RADIO, when I selected one of the radios from the Switchinput the default radio checked doesn't change on the action, in the image bellow you can see that I have selected the "Publico" state, but in the code the sate checked stay on the default (in this case "Borrador" state).

And when I try to get the state via Javascript or jQuery, I got nothing because the input neve change to the selected one.

Please help!

Thanks in advance.

My jQuery file:
$(document).ready(function() { // Escuchar cambios en el radio button $('input[name="estado_publicacion[Estado]"]').on('change', function() { let selectedValue = $('input[name="estado_publicacion[Estado]"]:checked').val(); console.log("Estado cambiado a: ", selectedValue); // 0, 1 o 2 según la opción seleccionada }); });

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant