Welcome Guest, Not a member yet? Register   Sign In
[resolved] CSRF issue when ajax functions and normal forms are used on the same page
#8

(This post was last modified: 10-02-2020, 07:31 AM by kilden.)

Ok... I've finally found it ! It was not a question of focus...

When we use the function form_open(), CI4 automatically creates an hidden file with CSRF tokens... So you just need to update the hidden input with current CSRF coming from ajax. I did something like : $("input[name='csrf_token']").val(csrf);

Thank you anyway for the help :-)
Reply


Messages In This Thread
RE: CSRF issue when ajax functions and normal forms are used on the same page - by kilden - 10-02-2020, 07:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB