jQWidgets Forums
jQuery UI Widgets › Forums › Form › Disable input in jqxform
Tagged: jqxForm jqxWindow diasable
This topic contains 5 replies, has 3 voices, and was last updated by JSt 5 years, 9 months ago.
-
AuthorDisable input in jqxform Posts
-
Hello,
How can i disable input text in a form please ?https://stackblitz.com/github/jqwidgets/angular_demos/tree/master/form/overview/
On this example, i don’t know how I can disable input of FirstName.
Thanks a lot
Hello mathod,
After the Form is created, you can get any of its fields using the
getComponentByName
method and customize it.
I have updated the Example.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/Thank you ! It works fine !
But, if i don’t know which component is, for example for a dropDownList i will use :
input.jqxDropDownList({disabled: true});
but how can i know which component is. is it possible to know that with
getComponentByName()
?
because I’m looping on all inputs, and sometimes, it can be an other component than input. DropDownList for example of checkboxThanks a lot
EDIT:
I have this bug, and i don’t know why :For my edit, it’s because my imput is a
number
and not atext
.
I need to replace byinputValue.jqxNumberInput({disabled: true});
But like i ask, how can i know which component is ? to call dynamically
inputValue.jqxNumberInput
orinputValue.jqxImput
,inputValue.jqxDropDownList
Hello mathod,
You can check what is the class of the selected component.
Please, look at the following Example.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/Hi,
I tried the same=> disable an input but during runtime.
I change in the html the autoopen to false<jqxWindow #tenantsDialogRef [autoOpen]=false [theme]="'material'" [resizable]="false" [width]="450" [height]="550"> <div #windowHeader>Add new tenant</div> <div style="overflow: hidden;" #windowContent> <jqxForm #fillTenantDataForm [width]='450' [height]="'auto'" [template]='template'> </jqxForm> </div> </jqxWindow>
and I open this window after a button press
private addNewTenant() { console.log(<code>TenantsComponent.addNewTenant(..) called</code>); let input = this.fillTenantDataForm.getComponentByName('firstname'); input.jqxInput({ disabled: true }); this.tenantsDialogRef.open() }
If I use the code above, the field is still enbled.
If I change autoopen=true and the change the disable parameter in ngAfterViewInit(..) the field is disabled.
Any hint for me?Regards
Jürgen -
AuthorPosts
You must be logged in to reply to this topic.