PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

New form fails to submit, general contact form works fine

  1. Hi All,
    I have created a new form that is quite extensive and am using a few hooks to get taxonomy terms to list as checkboxes. My site is a directory and this form is to function as registration of new sites/companies to be listed. Since my general contact form works flawlessly there has to be another issue with my new form. Here is the link to the registration form: and my gen contact form is here:

    I can only think of two things causing the problem(but could be totally wrong here):
    1. My code for adding in the taxonomy terms is causing an issue,
    2. My server does not allow that much data to be posted - its a large form.

    Here's a sample of my hook function:

    add_filter("gform_pre_render_25", populate_lingerie_category_checkbox);
    //form id 25 field id 31
    function populate_lingerie_category_checkbox($form){
        //get all the lingerie-categories
    	$terms = get_terms('lingerie-categories', 'orderby=name&hide_empty=false');
    	//Creating choices and inputs as empty arrays
        $choices = array();
        $inputs = array();
    	$i = 1;
    	foreach( $terms as $term ):
    		$field_id = "31.".$i;
    		array_push($choices, array("text" => $term->name, "value" => $term->name));
    		array_push($inputs, array("label" => $term->name, "id" => $field_id));
    	// we need a counter to create the field id
    	//Adding items to field id 31
       	foreach($form["fields"] as &$field):
            if($field["id"] == 31):
    			$field["type"] = 'checkbox';
                $field["choices"] = $choices;
           	    $field["inputs"] = $inputs;
        return $form;
    }//end populate_lingerie_category_checkbox

    With this I am changing a text input into a set of checkboxes. Not sure if this is the correct way to go about it. I do this for all of the taxonomies with separate functions for each text field to change/alter.

    I get no notice and no email is sent. I really am at a loss here. Any help is greatly appreciated!

    Posted 10 years ago on Saturday December 3, 2011 | Permalink
  2. If you remove your custom code, does the form submit and function properly?

    Posted 10 years ago on Saturday December 3, 2011 | Permalink
  3. No unfortunately it doesn't. Tried that after I submitted to the forums. I also created a another new form, just a small one, and it worked. It had 4 form fields. Thanks

    Posted 10 years ago on Saturday December 3, 2011 | Permalink
  4. OK, so my host has suggested I break down the form into a multi-page form where each page submits data and then the last page submits the response and sends the email. I am not terribly familiar with this type of form set up, so any suggestions are totally welcome.

    I assume I'll need to use several hooks and functions to get this to work the right way but am unsure where to start. Thanks in advance!

    Posted 10 years ago on Saturday December 3, 2011 | Permalink
  5. Sorry for all the extra postings here. Should have done a search before hand.

    Found info on how to do this without adding a bunch of extra hook functions. Multiple forms that redirect to the next page in the set of forms. Only question is: do I add CAPTCHA on each page/form to limit spamming across the 9 pages of forms I need to use?

    Posted 10 years ago on Saturday December 3, 2011 | Permalink
  6. OK, so I am testing out my form split into pages and the first page will not submit. I know it can't be too much information in the form, so I have no idea why it is not submitting. My General Contact form still works so I know the plugin is working correctly for that form.

    I have the first page of my multi-page form set to give an AJAX response instead of redirecting to the next page for testing - Please if you have any ideas let me know. This is getting really strange as to why no form other than the General contact form will not submit.


    Posted 10 years ago on Wednesday December 7, 2011 | Permalink