Adding attributes to <form > tag

I am trying to add ‘data-abide’ attribute to the ‘<form >’ tag, using ActiveForm::begin($options)

(I would like to implement abide form from here: http://foundation.zurb.com/sites/docs/abide.html )

I’ve tried using: <?php $form = ActiveForm::begin([‘id’ => ‘contact-form’, ‘data-abide’=>’’]); ?>

but get exception:

Unknown Property – yii\base\UnknownPropertyException

Ideally I’d like to create a child of ActiveForm which makes all forms include this data-abide property into the <form> tag.

thanks for help

I’ve also added comment to this post:


<?php $form = ActiveForm::begin(['options' => ['data-abide'=>true]]); ?>

Hi Selvakumar,

Thanks but this still did not work. Still getting:


data-abide="66d4xm-abide"

The JS is adding the extra token:

The JS is adding the extra token:

The JS is adding the extra token: