You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I added client script as below to new standard web form v 11 as per the following link guide, but the scripts not work with me. even I reloaded page, bench build, bench migrate, new site installation and cleared cache too.
client script
// Set Field Property based on valuefrappe.web_form.on(‘business_registration_type’,(field,value)=>{if(value==‘Domestic’){frappe.web_form.set_field_property(‘telephone_number’,‘reqd’,1);}elseif(value==‘Foreign’){frappe.web_form.set_field_property(‘telephone_number’,‘reqd’,0);}});
Console Error
Uncaught TypeError: Cannot read property ‘fields_dict’ of undefined
at frappe.web_form.wrapper.get_field (web_form_class.js:99)
at frappe.web_form.wrapper.on (web_form_class.js:129)
at Object.frappe.init_client_script (supplier-registration-application?new=1:390)
at web_form.js:40 And this
Please advise
The text was updated successfully, but these errors were encountered:
I had the same issue, if you debug it one more step deep enough, you'll see that, 'this'(webform) have the 'fields_dict' as null which means you've called the listener even before the form has completed its loading.
Try to put the listener inside the callback of the 'after_load' event/listener of the webform and you'll not see this error
Hello,
I added client script as below to new standard web form v 11 as per the following link guide, but the scripts not work with me. even I reloaded page, bench build, bench migrate, new site installation and cleared cache too.
client script
Console Error
Please advise
The text was updated successfully, but these errors were encountered: