Closed cmy82 closed 2 years ago
I'm not sure about this one. It is reqParams
in the code :
https://github.com/userfrosting/UserFrosting/blob/621373002867c76bc581114b352b32ce2c19fb07/app/sprinkles/core/assets/userfrosting/js/uf-form.js#L180-L192
It is, but using reqParams doesn't pick up the changes. I couldn't find where it actually pulled any of the values from reqParams to update the options in the code, unless I missed that part. Using reqParams didn't work for me, but using ajax did.
If you look at the code above there: https://github.com/userfrosting/UserFrosting/blob/621373002867c76bc581114b352b32ce2c19fb07/app/sprinkles/core/assets/userfrosting/js/uf-form.js#L173-L174
It pulls the ajax settings parameter from the options passed in, but nowhere does it override the ajax settings with any values from reqParams value in the passed in settings.
I guess either the parameter needs to be ajax, or line 174 need to be this.setteings.reqParams
Oh I see. No you're right, it should be .ajax
.
For my reference: https://learn.userfrosting.com/client-side-code/components/forms#reqparams
The ajax paremater name in the plugin is ajax and not reqParams.