Title: [Plugin: WordPress Form Manager] Posting Form Data to Another Form
Last modified: August 20, 2016

---

# [Plugin: WordPress Form Manager] Posting Form Data to Another Form

 *  Resolved [ibc3](https://wordpress.org/support/users/ibc3/)
 * (@ibc3)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/)
 * One more question for you… I am using your awesome plug-in to capture a zip (
   so we can download the .csv file), and then push to another plug-in (store locator)
   to find locations near the zip that is entered. I am currently doing this by 
   using a custom summary template that I created with some javascript:
 * `
    <form method="post" id="zipForm" name="zipForm" action="http://testingtogether.
   org/locator/"> <input name="addressInput" maxlength="5" size="5" type="hidden"
   value="<?php echo $zip?>" /> <input name="radiusSelect" type="hidden" value="
   50"> </form>
 * <script type="text/javascript">
    function submitToLocator () { var frm = document.
   getElementById("zipForm"); frm.submit(); } window.onload = submitToLocator; </
   script>
 * Do you recommend a better way to do this?
 * Thanks again! This is really the best form plug-in out there.
 * [http://wordpress.org/extend/plugins/wordpress-form-manager/](http://wordpress.org/extend/plugins/wordpress-form-manager/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139361)
 * Thank you! You could hook in to the onsubmit event of the initial form, use ajax
   to forward the zip to FM, and then load the ‘store locater’ page.
 *  Thread Starter [ibc3](https://wordpress.org/support/users/ibc3/)
 * (@ibc3)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139485)
 * Thanks for the tip! I’m new to using ajax & I’ve looked at this a bit, but I’m
   still not seeing exactly what I need to do… Do you mind giving me a little more
   detail so that I can figure it out? Thanks again!
 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139492)
 * Okay I can see I left out some important details. To submit the form via AJAX
   you need to grab the nonce and the form ID along with any of the form items. 
   Easier to give an example than to explain:
 *     ```
       function custom_submit(){
       	var result = <?php echo fm_form_submit_btn_script();?>;
       	if(result == false) return false;
       	var item = fm_get_form_item('the-item');
       	var data = {
       		fm_id: document.getElementById('<?php echo fm_form_ID();?>')['fm_id'].value,
       		fm_nonce: document.getElementById('<?php echo fm_form_ID();?>')['fm_nonce'].value
       	};
       	data[item.id] = item.value;
       	jQuery.post('<?php the_permalink(); ?>', data);
       	// do whatever else
       }
       ```
   
 *  Thread Starter [ibc3](https://wordpress.org/support/users/ibc3/)
 * (@ibc3)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139505)
 * Thanks for the tip. Can you tell where the data should post to? I see the_permalink
   listed here, but is that what I should use? It looks like it just displays the
   page. Does that make sense?
 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139506)
 * When you submit a form it posts the data to the page with the form on it. The
   shortcode takes care of both showing the form and processing the post data. Basically
   the javascript simulates submitting the form without the browser having to reload
   the page.
 *  Thread Starter [ibc3](https://wordpress.org/support/users/ibc3/)
 * (@ibc3)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139509)
 * Thanks! Yes, got it working about the time you sent this response. Will post 
   final code after I clean it up a bit.
 * I noticed that on IE9 (have not checked other versions of IE) that the validation
   is not working. I enter a valid zip, but fm responds that a valid zip must be
   entered… Any suggestions? I haven’t started digging into this yet, just noticed
   it… Other browsers seem fine with the validation.
 *  Thread Starter [ibc3](https://wordpress.org/support/users/ibc3/)
 * (@ibc3)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139546)
 * OK, here’s what I ended up with to pass a variable from FM to another plug-in.
   Thanks again for your guidance!
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 *  [cdrady01](https://wordpress.org/support/users/cdrady01/)
 * (@cdrady01)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139667)
 * hi ibc3, I can’t find the code you ended up with (moderator moved it?) I’m trying
   to send the zip code from my home page to the store-locator. I just need a form
   that will collect a zip code from the user and send it to the locator so that
   it loads closest locations to that zip automatically. I’m not using FM though,
   is the code you came up with able to do this? Thanks in advance 🙂
 *  Thread Starter [ibc3](https://wordpress.org/support/users/ibc3/)
 * (@ibc3)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139668)
 * Hi, cdrady01! So sorry for the delay. We were out of town, and then I had to 
   dig through this to find it – seems like an eternity ago.
 * I think this is the code that I had posted. Hope this helps if I’m not too late
   posting it.
 * [http://pastebin.com/M9kUzGxB](http://pastebin.com/M9kUzGxB)

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: WordPress Form Manager] Posting Form Data to Another Form’ is
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-form-manager.svg)
 * [Form Manager](https://wordpress.org/plugins/wordpress-form-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-form-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-form-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-form-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-form-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-form-manager/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [ibc3](https://wordpress.org/support/users/ibc3/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpress-form-manager-posting-form-data-to-another-form/#post-2139668)
 * Status: resolved