• Hi there,

    I have created a form on my football teams website for the signup to our academy.

    The form looks like this:

    <b>The FA have introduced a football programme called ‘The Whole Game System’ (WGS).<br> 
    Requiring all Players / Parents to provide information through the Hastings United Football Club Registration form, which will then be uploaded onto the Whole Game System.<br> 
    We are also required to upload an electronic photo for every young player’s identification.  We are also
    tasked to see proof of ID (copy of Passport or Birth Certificate) of Registering Player.</b>
    
    <h2 style="text-decoration:underline;color:#970605;">Player Details</h2>
    
    <label>Full Name (including middle names if applicable)
        [text* player-name] </label>
    
    <label> Date of Birth
        [date* player-dob id:address] </label>
    
    <label> Gender
        [select* player-gender "Male" "Female" "Other (Please Specify)"]
        </label>
    <label> Other 
    [text gender-other "Other Please Specify"] </label>
    
    <label> Known Medical Conditions/Allergies
    [text player-medical] </label>
    
    <label> Home Address
        [textarea* player-address id:address] </label>
    
    <label> Contact Telephone Number (Not Required)
        [tel player-telephone] </label>
    
    <label> Email Address (Not Required)
        [email player-email] </label>
    <label> Age Group for Season 2021/2022
    Under: [text* player-agegroup]</label>
    
    <label> Player Nationality
        [text* player-nationality] </label>
    
    <label> Player Photo
         [file* file-193 limit:12mb filetypes:gif|png|jpg|jpeg|HEIC]</label>
    
    <label> Player Identification (Passport or Birth certificate)
         [file* file-194 limit:13mb filetypes:gif|png|jpg|jpeg|HEIC]</label>
    
    <h2 style="text-decoration:underline;color:#970605;">Parent/Guardian information</h2>
    
    <label> Name
        [text* parent-name] </label>
    
    <label> Relationship
        [text* parent-relationship] </label>
    
    <label> Home Address (if different from player address)
        [textarea parent-address id:address] </label>
    
    <label> Contact Telephone Number
        [tel* parent-telephone] </label>
    
    <label> Email Address
        [email* parent-email] </label>
    
    <label> By Providing the above information and signing this form, I hereby agree for the information being used only for the sole use of Hastings United Football Club for the 2021-22 season.<br><br> 
    By signing this form also grants permission for the medical Rep’ of Hastings United FC giving First Aid and/or accompanying the named young person to Hospital in case of emergency.<br>
    [checkbox* codeofconduct id:agree class:agree "I/we agree to abide with ‘HUFC Respect Code of Conduct For Parents/Spectators/ Young Players’."] </label>
    Link to <a href="https://www.hastingsunited.com/wp-content/uploads/2021/06/HUFC_Code_of_Conduct_21.22.docx">Code of Conduct</a><br>
    
    <label><br><b>Data Protection Act 2018. Communication Consent.
    I agree that the above named player may be named, videoed, and/or have photographs taken, whilst playing/training for the Club. This may then be used in HUFC promotional and Social Media use.</b>  </label>
    [radio gdpr use_label_element id:agree default:1 "Yes" "No"]
    
    [hidden text-77 default:text "50"]
    
    <span>Please note a non refundable £50 registration fee is required. You will be taken to a PayPal screen to make the payment. Don't use paypal? Click Pay with Debit or Credit Card at the bottom of the login screen.</span>
    
    [submit "Submit"]

    But when the gdpr and gender get sent through all that comes through on the email is the word ‘array’.

    I don’t understand what is happening, could someone please assist?

    thanks

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • hi @chalkie1983uk

    can you show also the mail tab

    in addition seems you have a plugin with the name of your website https://aaaaaaaaaaaaaaaa/home/aaaaaaaaaa/public_html/wp-content/plugins/aaaaaaaaaaa_fwp/myscript.js?ver=1

    that is buggy and force wpcf7 into non ajax mode.

    Thread Starter chalkie1983uk

    (@chalkie1983uk)

    okay, this is the mail tab:

    From: [parent-name] <[parent-email]> 
    Subject: Academy form submission
    
    Message Body:
    New Academy Form Signup
    
    Player Name: [player-name]
    [player-name]'s Date of Birth: [player-dob]
    [player-name]'s Gender: [player-gender] [gender-other]
    [player-name]'s Address: [player-address]
    [player-name]'s Medical/Allergy information: [player-medical]
    [player-name]'s Age Group: [player-agegroup]
    [player-name]'s Contact Number: [player-telephone]
    [player-name]'s Email Address: [player-email]
    [player-name]'s Nationality: [player-nationality]
    
    Parent/Guardian Information
    
    Name: [parent-name]
    Relationship: [parent-relationship]
    Address (if different from student) [parent-address]
    Contact Number: [parent-telephone]
    Email Address: [parent-email]
    
    I agree that the above named player may be named, videoed, and/or have photographs taken, whilst playing/training for the Club. This may then be used in HUFC promotional and Social Media use: [gdpr]
    
    Code of Conduct Agreed
    
    -- 
    This e-mail was sent from the academy signup form on [_site_title] ([_site_url])

    as for that script thats a script i wrote for uploading images on the back end, here is what it looks like:

    jQuery( document ).ready( function( $ ) {
    
    			// Uploading files
    			var file_frame;
    			var wp_media_post_id = wp.media.model.settings.post.id; // Store the old id
    			var set_to_post_id = <?php echo $my_saved_attachment_post_id; ?>; // Set this
    
    			jQuery('#upload_image_button').on('click', function( event ){
    
    				event.preventDefault();
    
    				// If the media frame already exists, reopen it.
    				if ( file_frame ) {
    					// Set the post ID to what we want
    					file_frame.uploader.uploader.param( 'post_id', set_to_post_id );
    					// Open frame
    					file_frame.open();
    					return;
    				} else {
    					// Set the wp.media post id so the uploader grabs the ID we want when initialised
    					wp.media.model.settings.post.id = set_to_post_id;
    				}
    
    				// Create the media frame.
    				file_frame = wp.media.frames.file_frame = wp.media({
    					title: 'Select a image to upload',
    					button: {
    						text: 'Use this image',
    					},
    					multiple: false	// Set to true to allow multiple files to be selected
    				});
    
    				// When an image is selected, run a callback.
    				file_frame.on( 'select', function() {
    					// We set multiple to false so only get one image from the uploader
    					attachment = file_frame.state().get('selection').first().toJSON();
    
    					// Do something with attachment.id and/or attachment.url here
    					$( '#image-preview' ).attr( 'src', attachment.url ).css( 'width', 'auto' );
    					$( '#image_attachment_id' ).val( attachment.id );
    
    					// Restore the main post ID
    					wp.media.model.settings.post.id = wp_media_post_id;
    				});
    
    					// Finally, open the modal
    					file_frame.open();
    			});
    
    			// Restore the main ID when the add media button is pressed
    			jQuery( 'a.add_media' ).on( 'click', function() {
    				wp.media.model.settings.post.id = wp_media_post_id;
    			});
    		});
    

    not sure why that would interfere with cf7…

    there are 3 elements with non-unique id #address, try to fix this and use a unique name.

    little debug help: the message is hidden! place this into “customizer -> custom css” and it will come back again.

    .wpcf7-form .wpcf7-response-output {
        background:blue;
        margin-top: 8px;
        padding: 4px 16px;
        border-radius: 4px;
    }
    .wpcf7-form.invalid .wpcf7-response-output {
        background: #e4080c;
    }
    • This reply was modified 3 years, 5 months ago by Erik.
    • This reply was modified 3 years, 5 months ago by Erik.
    Thread Starter chalkie1983uk

    (@chalkie1983uk)

    Erik I appreciate your guidance on that but it doesnt assist me with the word ‘array’ being sent by the form from dropdown/radio buttons and checkboxes.

    sure but in order to fix you need to solve some critical issues in your form like the non unique id.

    Thread Starter chalkie1983uk

    (@chalkie1983uk)

    Ah sorry i understand, should have been class and not id… it was only for styling.

    Thread Starter chalkie1983uk

    (@chalkie1983uk)

    Okay I changed it to class rather than id as so:

    <b>The FA have introduced a football programme called ‘The Whole Game System’ (WGS).<br> 
    Requiring all Players / Parents to provide information through the Hastings United Football Club Registration form, which will then be uploaded onto the Whole Game System.<br> 
    We are also required to upload an electronic photo for every young player’s identification.  We are also
    tasked to see proof of ID (copy of Passport or Birth Certificate) of Registering Player.</b>
    
    <h2 style="text-decoration:underline;color:#970605;">Player Details</h2>
    
    <label>Full Name (including middle names if applicable)
        [text* player-name] </label>
    
    <label> Date of Birth
        [date* player-dob class:address] </label>
    
    <label> Gender
        [select* player-gender "Male" "Female" "Other (Please Specify)"]
        </label>
    <label> Other 
    [text gender-other "Other Please Specify"] </label>
    
    <label> Known Medical Conditions/Allergies
    [text player-medical] </label>
    
    <label> Home Address
        [textarea* player-address class:address] </label>
    
    <label> Contact Telephone Number (Not Required)
        [tel player-telephone] </label>
    
    <label> Email Address (Not Required)
        [email player-email] </label>
    <label> Age Group for Season 2021/2022
    Under: [text* player-agegroup]</label>
    
    <label> Player Nationality
        [text* player-nationality] </label>
    
    <label> Player Photo
         [file* file-193 limit:12mb filetypes:gif|png|jpg|jpeg|HEIC]</label>
    
    <label> Player Identification (Passport or Birth certificate)
         [file* file-194 limit:13mb filetypes:gif|png|jpg|jpeg|HEIC]</label>
    
    <h2 style="text-decoration:underline;color:#970605;">Parent/Guardian information</h2>
    
    <label> Name
        [text* parent-name] </label>
    
    <label> Relationship
        [text* parent-relationship] </label>
    
    <label> Home Address (if different from player address)
        [textarea parent-address class:address] </label>
    
    <label> Contact Telephone Number
        [tel* parent-telephone] </label>
    
    <label> Email Address
        [email* parent-email] </label>
    
    <label> By Providing the above information and signing this form, I hereby agree for the information being used only for the sole use of Hastings United Football Club for the 2021-22 season.<br><br> 
    By signing this form also grants permission for the medical Rep’ of Hastings United FC giving First Aid and/or accompanying the named young person to Hospital in case of emergency.<br>
    [checkbox* codeofconduct class:agree "I/we agree to abide with ‘HUFC Respect Code of Conduct For Parents/Spectators/ Young Players’."] </label>
    Link to <a href="https://www.hastingsunited.com/wp-content/uploads/2021/06/HUFC_Code_of_Conduct_21.22.docx">Code of Conduct</a><br>
    
    <label><br><b>Data Protection Act 2018. Communication Consent.
    I agree that the above named player may be named, videoed, and/or have photographs taken, whilst playing/training for the Club. This may then be used in HUFC promotional and Social Media use.</b>  </label>
    [radio gdpr use_label_element class:agree default:1 "Yes" "No"]
    
    [hidden text-77 default:text "50"]
    
    <span>Please note a non refundable £50 registration fee is required. You will be taken to a PayPal screen to make the payment. Don't use paypal? Click Pay with Debit or Credit Card at the bottom of the login screen.</span>
    
    [submit "Submit"]

    But the email is still sending the word array rather than the selected option.

    strange because i can complete the form and being redirected to the paypal payment.

    please fill all the required fields (gender-other seems to be required, maybe forced by js?)

    And as advice, you may show the notices to understand the required fields

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Radio and Select options send array’ is closed to new replies.