Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2017
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto submit php form?

    I have a php file that is basically a submission form. I want it to submit itself automatically. My problem, is that it seems that if I substitute the submit input field name by, for example, btnsubmit (so the submit function won't be invalid), a simple document.getElementById("myForm").submit() doesn't complete the job (since it's called inside another php file). It seems that the calling file requires the submit field name and value.

    I'm a little bit confuse on how to make this work.

    Any help is welcomed.

  2. #2
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    West Des Moines, Iowa
    Posts
    8,107
    Thanks
    37
    Thanked 1,086 Times in 1,082 Posts
    After 5 posts you should know no code no help, but you should also know that This is a JS job and that the feilds of the forum should be checked to have correct input and you should use a listener on the field that should trigger the submit.

    Post code.
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •