This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Wouter
Wouter

Hi, I was wondering If its possible to add a costum class to a text input field. I just can find how add a class to div for the input box. Now whit addClass the div get class="form-group text-field span-left my-costum-class" But I need that the class will be added to the input box like input type="text" name="TestPlugin[vlag]" id="Form-field-TestPlugin-vlag" value="" placeholder="some text" class="form-control my-costum-class" autocomplete="off" maxlength="255"/> I use now the follow code to generate the form element:


'vlag' => [
                'label'   => 'Vlag',                
                'comment' => 'wat tekst',
                'type' => 'text',
                'span' => 'left',
                'cssClass' => 'my-costum-class',
                'tab' => 'Algemeen',

Any one who knows if I can add a class to the input box ?

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.