[Plugin: Contact Form 7] How to set an array for multiple/duplicate fields? 'Array' in ema
-
In need of some immediate help! I have a javascript that creates new fields when a user needs to make multiple responses for medical histories. Inside each new <fieldset> is a combobox & text field…I’m utilizing this module for another <fieldset> that just contains a text field.
My email goes through and the first <fieldset>, ‘Medical Conditions’ comes through without too much issue (aside from each response coming through as:
Medical Conditions: Heart Disease, GERD, Acid Reflux
How long afflicted: 12 years, 5 months, 2 years..but one thing at a time).
Now, the second <fieldset> ‘Medications’, however, only returns the response ‘Array’. I’m not sure why the first works, but not the second…but what should I do? Is there some way to set up javascript to cycle through the array, or am I doing something wrong in my code?
Conditions:
<fieldset> <legend>Medical Condition(s): (Click '+' to Add, '-' to Delete)</legend> <fieldset id="duplicate"> <legend>Choose Condition and Affliction Period: </legend> <p><label for="condition">Condition: </label>[select condition id:condition "Acid Reflux Disease (GERD)" "Acne" "Allergies" "Attention Deficit Disorder" "Alzheimer's Disease" "Anorexia Nervosa" "Arthritis" "Asthma" "Back Pain" "Bipolar Disorder (BD)" "Brain Injury" "Bronchitis" "Bulimia" "Bursitis" "Cancer" "Celiac Disease" "Cholesterol" "Chronic Obstructive Pulmonary Disease (COPD)" "Congestive Heart Failure (CHF)" "Crohn's Disease" "Depression" "Diabetes" "Diarrhea" "Disabilities" "Diverticulitis" "Ear Infections" "Ear Problems" "Eczema" "Endometriosis" "Enlarged Prostate" "Epilepsy (Seizure)" "Erectile Dysfunction (ED)" "Eye Problems" "Fibromyalgia" "Gallbladder Disease" "Gallstones" "Generalized Anxiety Disorder" "Genital Herpes" "Glomerulonephritis (Nephritis)" "Gout" "Headache" "Hearing Loss" "Heart Disease" "Heartburn" "Hemorrhoids" "Hepatitis" "Herniated Discs" "Hiatal Hernia" "HIV/AIDS" "High Blood Sugar: Hyperglycemia" "High Blood Pressure" "Hyperkalemia: High Potassium" "Hyperthyroidism" "Hypothyroidism" "Infertility" "Insulin Dependent Diabetes Mellitus (IDDM)" "Iron Deficiency Anemia" "Irritable Bowl Syndrome (IBS)" "Itching" "Juvenile Diabetes" "Juvenile Rheumatoid Arthritis" "Kidney Diseases" "Kidney Stones (Renal Calculi)" "Lupus" "Memory Loss" "Menopause" "Mesothelioma" "Migraine" "Multiple Sclerosis (MS)" "Muscle Cramps" "Muscle Fatigue" "Muscle Pain" "Obesity" "Osteoarthritis (OA)" "Osteomyelitis" "Osteoporosis" "Ovarian Cancer" "Ovarian Cyst" "Pain" "Parkinson's Disease (PD)" "Peripheral Artery Disease (PAD)" "Peptic Ulcers" "Polio" "Pneumonia" "Post Nasal Drip" "Post Traumatic Stress Disorder" "Premenstrual Syndrome (PMS)" "Psoriasis" "Renal Failure" "Restless Legs Syndrome (RLS)" "Rheumatoid Arthritis (RA)" "Ringworm" "Rosacea" "Sciatica" "Schizophrenia" "Sinus Infections" "Skin Rash or Hives" "Sleep Disorders (Sleep Apnea)" "Snoring" "Staph Infection (MRSA)" "Tuberculosis (TB)" "Ulcers" "Urinary Tract Infection (UTI)" "Varicose Veins" "Vertigo" "Yeast Infection (Candidiasis)" "Other"]</p> <p><label for="monthsyearsnumber">Approximately: </label>[select monthsyearsnumber id:monthsyearsnumber "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11+"][select monthsyears id:monthsyears "Months" "Years"]</p> <p><label for="typelocationother">Type/Location/Other: </label>[text typelocationother id:typelocationother]</p> </fieldset> <p><span><a id="minus" href="">[-]</a> <a id="plus" href="">[+]</a></span></p> </fieldset>
Medications:
<fieldset> <legend>Medication(s): (Click '+' to Add, '-' to Delete)</legend> <fieldset id="duplicate2"> <legend>If 'Yes', please list Medication(s):</legend> <p>[text medicationslist id:medicationslist]</p> </fieldset> <p><span><a id="minus2" href="">[-]</a> <a id="plus2" href="">[+]</a></span></p> </fieldset>
As you will notice, the ‘duplicate’ id’s are unique to each <fieldset> so that shouldn’t be an issue, its just for the javascript to identify the fields to duplicate using the ‘+’ or remove with the ‘-‘.
What could I be doing wrong here to get a decent response for one, but ‘Array’ for the other??
Thanks to any and all who can help, and the sooner the better!! ??
- The topic ‘[Plugin: Contact Form 7] How to set an array for multiple/duplicate fields? 'Array' in ema’ is closed to new replies.