Jump to content

hide field


Manol
 Share

Recommended Posts

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);

476391784_Capturadepantalla2018-05-30alas18_11_54.png.e7e20b49b473442bebb056a8cb113a51.png

Link to comment
Share on other sites

$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

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...