0

I have a custom payment with custom block and added two radio buttons

        <li>
            <input type="radio" name=payment["opts"] value="global" checked>
            <label for="1">option 1</label>
        </li>
        <li>            
            <input type="radio" name=payment["opts"] value="local">
            <label for="2">option 2</label>
        </li>   

but how do I get the options value inside the controller or block?

1 Answer 1

0

You can use this to get the value of checked option value and you can use this value in Ajax Request to send it to the controller.

$('input[name=opts]:checked').val();
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.