Manol Posted May 30, 2018 Share Posted May 30, 2018 I'm trying to hide an inputfield but label still appears: $field = $modules->get("InputfieldText"); $field->attr('id+name','name'); $field->attr('v-model','usuario'); $field->attr('style','display: none'); $field->required = 1; $form->append($field); Link to comment Share on other sites More sharing options...
Autofahrn Posted May 30, 2018 Share Posted May 30, 2018 If that field should only transport some additional data, why not simply add some markup? $form->appendMarkup = "<input type='hidden' name='some-name' value='some-value' />"; Link to comment Share on other sites More sharing options...
Manol Posted May 30, 2018 Author Share Posted May 30, 2018 Is a form with several fields that is populated via vuejs, and just need a submit button to show up. Link to comment Share on other sites More sharing options...
Zeka Posted May 30, 2018 Share Posted May 30, 2018 $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 2 1 Link to comment Share on other sites More sharing options...
Robin S Posted May 30, 2018 Share Posted May 30, 2018 Use a hidden inputfield: $field = $modules->get("InputfieldHidden"); 1 2 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