Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #162126

    Hi,

    I have created a large contact form with up to 20 mixed input fields. You can see the form here: http://www.aalc.org.nz/register/ However I am having the following issues when the form is submitted and emailed;

    – The content for the last two text fields are missing. Not even the label displays in the email. Is there a limit on number of form elements or the form label length? (I have tried changing these form elements to type of text field rather then text area but still no luck).

    – The checkbox item when ticked is emailed through with the value of “false” instead of “true”.

    Any ideas?

    Thanks

    #162844

    Hi,
    Yes, there’s a limit on the form label length because our theme generates the form field name based on the form label text and i.e. the label “Yes, I am happy for AALC to use share my email address among full members of the AALC” will result in the field name “avia_yes_i_am_happy_for_aalc_to_use_share_my_email_address_among_full_members_of_the_aalc_1” which is probably too long. Just for test purposes – try to reduce the label characters of the checkbox and see if this fixes issue 2) – if yes I’ll look into a solution.

    #162862

    Ok, update – I tested the long labels on my test server and they worked too. Something else must be the problem. Please activate the debug mode ( https://kriesi.at/support/topic/lost-all-the-avia-blocks-on-a-page-upon-save-revision-does-not-work/#post-140634 ) and copy the shortcode content from the debug window. Then post the shortcode content here.

    #163280

    Hi Dude thanks for the reply.

    I have just done a quick test and reducing the length of the labels seems to have solved both issues.

    Just out of interest do you know the character limit for the form labels? It seems it might currently be too short for my purpose, but if I know the limit I maybe able to creatively re-word the labels.

    Thanks again

    #163644

    Hi!

    I tagged the topic for Dude but if you could also turn on the debug mode and copy+paste the shortcode you are using for that contact field here (when it wasn’t working) he’ll be able to dig a bit deeper into the issue.

    Regards,
    Devin

    #163950

    Hello!

    I couldn’t reproduce the label issue on my test server and the $_post varible name length probably depends on the php.ini (configuration file) settings ( http://www.ozzu.com/programming-forum/max-length-post-get-variable-names-t77133.html ). We’ll add a fix to the next update – for now you can fix it by editing wp-content\themes\enfold\framework\php\class-form-generator.php. Open up the file and replace

    
    				$key = avia_backend_safe_string($key);
    
    				if(empty($key))
    				{
    					$iterations++;
    					$key = $iterations;
    				}
    

    with

    
    				$key = avia_backend_safe_string($key);
    
    				if(empty($key))
    				{
    					$iterations++;
    					$key = $iterations;
    				}
    
    				$key = avia_backend_truncate($key, 15, "_", "", false, '', false);
    

    and

    
    					$element_id = avia_backend_safe_string('avia_'.$key);
    					if($element_id == "avia_")
    					{
    						$iterations ++;
    						$element_id = "avia_".$iterations;
    					}
    
    

    with

    
    					$element_id = avia_backend_safe_string('avia_'.$key);
    					if($element_id == "avia_")
    					{
    						$iterations ++;
    						$element_id = "avia_".$iterations;
    					}
    
    					$element_id = avia_backend_truncate($element_id, 20, "_", "", false, '', false);
    

    Best regards,
    Peter

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Contact form not emailing through all fields’ is closed to new replies.