0
votes

This is my create poll page. ][1]

This is my edit form. ][2]

When i click create poll button it work well but when i click edit button it shows all the value to be edited in form but it doesn't enable the button until i touch the input textbox and change some value on the input textbox.

The button editpoll on the edit form is disabled even all the values are filled in the form. The editpoll button will be enabled only when i touch all the input text field and overwrite the value.

2
What is your question en what is your code - Robin Dijkhof
I am just trying to to a edit operation.What i expect is that when i clicked edit button it should enable the edit poll button but it was disabled. It will be enabled only if i touched all the text box. - sabin shrestha
What is the condition you use to disable the button? - cyberpirate92
Again, show some code - Robin Dijkhof

2 Answers

1
votes

The editpoll button will be enabled only when i touch all the input text field and overwrite the value.

Look like to you button disabled attribute is binded to pristine:

<button type="submit" [disabled]="form.pristine && !form.valid" />

Update it to:

 <button type="submit" [disabled]="!form.valid" />

enter image description here

0
votes

As the previous guy said, it'd be better if you'd share some piece code.

any way, according to your explanation it seem like it waits until your form marked as 'dirty'. check again if there's no condition set for the [disabled] attr on the edit button elemnt.