1

I have been developing validations for my form.

It is possible to get text input's value like;

$password = Craft::$app->request->getBodyParam('password');

However, this function seems not to work for radio button fields. Could you tell me how to get radio button's value?

  • I found that getBodyParam function's param is the element's id. However, for radio button, the key must be name. What should I do? – Kota.M Jul 4 '19 at 17:37
1

I have solved it by myself;

$application = $event->sender->application;

Even for radio button's value, no suffix is necessary like value.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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