Search code examples
javascriptwordpressninja-forms

How to get form id of ninja form before submit form in wordpress using javascript


I have created multiple ninja forms. while filling form data how would I know in which form I am filling?

How can I get form id of ninja form before submitting the form in WordPress using javascript?


Solution

  • please try below code

    console.log(form.id);
    

    you can get form id as soon as form initilised