pwFoo Posted January 2, 2015 Share Posted January 2, 2015 skipLabel I try to skip the form field label, but don't get it working... Field is based on an array array( 'type' => 'submit', 'value' => $this->_('Login'), 'id' => 'submit', 'name' => 'submit', 'skipLabel' => Inputfield::skipLabelHeader, ) Second try... getthe form field an set it after added to the form. $submit = $this->form->get('submit'); $submit->set('skipLabel', 2); // Inputfield::skipLabelHeader; https://processwire.com/talk/topic/5488-checkbox-other-text-in-header-than-label-text/?p=53528 https://processwire.com/talk/topic/2089-create-simple-forms-using-api/?p=69445 type password I try to build a login form, but there seems no way to set it the field information array array( 'type' => 'text', // 'password' <-- InputfieldPassword != type password 'label' => $this->_('Password'), 'name' => 'password', 'id' => 'password', 'name' => 'password', 'required' => true, ) As solution I get the field from the form and modify it, but is there a clean way to define it? $passField = $this->form->get('password'); $passField->attr('type', 'password'); Link to comment Share on other sites More sharing options...
OLSA Posted August 25, 2016 Share Posted August 25, 2016 Hello, I have the same problem today and done this to solve that: $your_field->label = ''; //first need to set field label as empty string (important!) $your_field->skipLabel = true; //works only if the label is set to empty string regards. 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now