Hi All,
How to solve this error ?
Steps to generate that error :-
1) Goto node/add/poll
2) Click on Add another choice button without filling any form values, so validations are fired
3) Now click on save button 2 times
4) you can see the following error on poll/js path
{ "status": true, "data": "\x3cdiv class=\"messages error\"\x3e\n \x3cul\x3e\n
\x3cli\x3eQuestion field is required.\x3c/li\x3e\n \x3cli\x3eYou must fill in
at least two choices.\x3c/li\x3e\n \x3c/ul\x3e\n\x3c/div\x3e\n\x3ctable
class=\"sticky-enabled\"\x3e\n
\x3cthead\x3e\x3ctr\x3e\x3cth\x3eChoice\x3c/th\x3e\x3cth\x3eVote
count\x3c/th\x3e \x3c/tr\x3e\x3c/thead\x3e\n\x3ctbody\x3e\n \x3ctr
class=\"odd\"\x3e\x3ctd class=\"poll-chtext\"\x3e\x3cdiv class=\"form-item\"
id=\"edit-choice-0-chtext-wrapper\"\x3e\n \x3cinput type=\"text\"
maxlength=\"128\" name=\"choice[0][chtext]\" id=\"edit-choice-0-chtext\"
size=\"60\" value=\"\" class=\"form-text error\"
/\x3e\n\x3c/div\x3e\n\x3c/td\x3e\x3ctd class=\"poll-chvotes\"\x3e\x3cdiv
class=\"form-item\" id=\"edit-choice-0-chvotes-wrapper\"\x3e\n \x3cinput
type=\"text\" maxlength=\"7\" name=\"choice[0][chvotes]\" id=\"edit-choice-0-
chvotes\" size=\"5\" value=\"0\" class=\"form-text\"
/\x3e\n\x3c/div\x3e\n\x3c/td\x3e \x3c/tr\x3e\n \x3ctr class=\"even\"\x3e\x3ctd
class=\"poll-chtext\"\x3e\x3cdiv class=\"form-item\" id=\"edit-choice-1-chtext-
wrapper\"\x3e\n \x3cinput type=\"text\" maxlength=\"128\"
name=\"choice[1][chtext]\" id=\"edit-choice-1-chtext\" size=\"60\" value=\"\"
class=\"form-text\" /\x3e\n\x3c/div\x3e\n\x3c/td\x3e\x3ctd class=\"poll-
chvotes\"\x3e\x3cdiv class=\"form-item\" id=\"edit-choice-1-chvotes-
wrapper\"\x3e\n \x3cinput type=\"text\" maxlength=\"7\"
name=\"choice[1][chvotes]\" id=\"edit-choice-1-chvotes\" size=\"5\" value=\"0\"
class=\"form-text\" /\x3e\n\x3c/div\x3e\n\x3c/td\x3e
\x3c/tr\x3e\n\x3c/tbody\x3e\n\x3c/table\x3e\n" }
Well, poll/js is ahah path of "Add another choice" button then why it's called
when we click on "Save" button
Thanks