I've been working module concept, using Wheel-Form. I can use the Wheel-Form(WF) plugin to save forms in the WF database, so the basic functionality is working.

I want to: 1) use Wheel-Form to allow admin users to create/modify WFs. 2) use WF hidden class fields to pass classes for styling. 3) Use a module/controller action to preprocess the request/parameters and render the WF, passing any additional variables to the renderTemplate. 4) Then, on-save, process the form data, turn part of it into json and save it to my database. I was able to do steps 1-3, but step 4 fails, here's my action function:

    public function actionIndex()
    $result = $_GET;
    //Need to do some db stuff here to retrieve the form id and such from a database
    Craft::$app->view->setTemplatesPath(CRAFT_BASE_PATH. '/modules/cceflexiformmodule/src/templates/');
    //Pass $_Get and other variables in the Render
    return Craft::$app->getView()->renderTemplate('candidate-intake.twig',$result);


The form renders properly but the Submit button returns this error: HTTP 400 – Bad Request – yii\web\BadRequestHttpException - Unable to verify your data submission.

Is the 'submit' happening under a different session or something?

Is it better to render the WF from the Craft entry and use javascript to call actions in my module controller? I have a feeling that the submit button would work. WF allows you to create a helper class that can be called with an event() after or before the form is committed.


Your Answer

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

Browse other questions tagged or ask your own question.