Yii 2.0 captcha

Hello to everyone!

I would like to use the captcha feature (yii class) on a custom form created via html: class and not via model. Is that possible?the form is submitted via Ajax request.

Thank you in advance!

Create an active form for it.

Thanks for your reply, but still on active forms I need a model, I would like to not use a model. I have to develop a sign up form, which will be visible on all over the website(show/hide via javascript and submit over ajax), so if I use an active form I have to pass the model in all actions???is there any other way? Is it possible to create a widget and call there the model of signup form and post on controller?

Probably you misunderstand what a model is.

The standard way of handling user input requires a model. Even when you don’t want to use an ActiveForm, you have to use some model to handle the user input.

You can create some widget that has a dedicated model and a controller for sign up feature.