What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Is it possible to hide empty fields from the submission email?

    Asked by homechef on April 12, 2012 at 06:02 AM

    Is it possible to hide empty fields from the submission email?

    Page URL:
    http://jotform.co/form/20840526566859

    email submission email
  • Profile Image
    JotForm Support

    Answered by jonathan on April 12, 2012 at 06:17 AM

    Hello,

    You are probably looking for this (see screen). There is an Auto Hide Empty Fields on the Submission page.

    Hope this help. Thanks.

  • Profile Image

    Answered by homechef on April 12, 2012 at 06:24 AM

    Hi,

     

    That doesn't affect the automatic email that is sent, Does it?

  • Profile Image
    JotForm Support

    Answered by jonathan on April 12, 2012 at 06:44 AM

    Oh I am very sorry, I misunderstood the question.
    You are correct, While the form's submission records can be filtered to show just completed fields this cannot be done when composing email alerts.

    But you can design it by making them a required field (so as not to be empty) or hide them through Conditional Logic on Forms.

    I noticed your forms have too many fields on them, probably the reason you needed to hide some unanswered questions. May I ask if those with asterisk(*) are supposedly required fields?

    Hope I made it better this time. Should you require further assistance, please inform us.

    Thanks.

  • Profile Image

    Answered by gori-mathew on April 12, 2012 at 06:49 AM

    Hello,

    Thanks for for your question. The alternative solution i can give you is to ensure that the fields that are not filled are not submitted. This way, you will only receive data form those fields that were answered.

    You can have a look at a previous answer i gave on this thread;

    http://jotform.com/answers/91486-I-only-want-info-that-is-filled-out-by-the-submitter-to-be-included-in-the-submission-email-I-receive-#1

     Hope this information is helpful to you, kindly lets know if you need any assistance on this issue. Thanks for using Jotform!

     

  • Profile Image

    Answered by homechef on April 12, 2012 at 07:58 AM

    Jonathan,

    The forms marked with a asterisk are for client's reference so that know if they can eat them or not if they are diabetic.

     

    Basically I get an email like this:

     


     
     
     
    Question Answer
    Full Name Name
    Phone Number Phone Number
    E-mail email@email.com
    Street Address Address
    Suburb Suburb
    Postcode Postcode
    Delivery Date 02-04-2012
    Diabetic Yes
    Food Allergies No
    Details  
    Order Number HCO-0000000082
    Regular Meals  
    Roast Beef  
    Roast Pork  
    Roast Chicken Drumsticks  
    Steak Mince Pie  
    Steak and Kidney Pie  
    Steak and Mushroom Pie  
    Steak and Curry Pie  
    Bacon and Egg Slice  
    Chicken and Vegetable Pie  
    Sausages in Onion Gravy  
    Curried Sausages  
    Savoury Sausages  
    Meatballs in Gravy  
    Spaghetti & Italian Meatballs  
    Stir Fry Meatballs  
    Sweet & Sour Meatballs  
    Chicken Breast Schnitzel  
    Chicken Parmigiana  
    Veal Schnitzel  
    Veal Parmigiana  
    Corned Beef with Parsley Sauce  
    Country Casserole  
    Beef Curry  
    Beef Lasagne  
    Beef Stroganoff  
    Beef Tortellini in Mushroom Sauce  
    Beef Satay (contains peanuts)  
    Spaghetti Bolognaise  
    Hearty Mince Casserole  
    Savoury Mince  
    Cottage Pie  
    Meatloaf  
    Meat Pastie  
    Lamb Curry  
    Minted Lamb Casserole  
    Traditional Irish Stew  
    Pork & Apple Casserole  
    Ham & Potato Bake  
    Sweet & Sour Pork  
    Ham & Steak Pineapple  
    Penne Carbonara  
    Chicken Chop Suey  
    Chicken Curry  
    Chicken Lasagne  
    Chicken Patties  
    Chicken & Spaghetti  
    Creamy Mustard Chicken  
    Chicken Cacciatore  
    Mushroom Chicken  
    Apricot Chicken  
    Sweet & Sour Chicken  
    Crumbed Fish (No Sauce)  
    Crumbed Fish & Seafood Sauce  
    Crumbed Fish & Cheese  
    Crumbed Fish & Tartare Sauce  
    Crumbed Fish & Fresh Lemon  
    Fish & Parsley (uncooked)  
    Crumbed Fish & Sweet & Sour Sauce  
    Baked Fish (uncooked)  
    Tuna Patties  
    Tuna Mornay  
    Frittata  
    Chick Pea Casserole  
    Vegetable Open Pie  
    Vegetable Pastie  
    Savoury Stuffed Potato  
    Macaroni Cheese  
    Vegetable Lasagne  
    Spinach Ravioli in Italian Sauce  
    Vegetable Fritters  
    Large Meals  
    Roast Beef 1
    Roast Pork  
    Roast Chicken Drumsticks 1
    Steak Mince Pie 1
    Steak and Kidney Pie  
    Steak and Mushroom Pie  
    Steak and Curry Pie  
    Bacon and Egg Slice  
    Chicken and Vegetable Pie  
    Sausages in Onion Gravy  
    Curried Sausages  
    Savoury Sausages  
    Meatballs in Gravy  
    Spaghetti & Italian Meatballs 1
    Stir Fry Meatballs  
    Sweet & Sour Meatballs  
    Chicken Breast Schnitzel  
    Chicken Parmigiana  
    Veal Schnitzel 2
    Veal Parmigiana  
    Corned Beef with Parsley Sauce 1
    Country Casserole  
    Beef Curry 1
    Beef Lasagne  
    Beef Stroganoff 2
    Beef Tortellini in Mushroom Sauce  
    Beef Satay (contains peanuts)  
    Spaghetti Bolognaise 1
    Hearty Mince Casserole 1
    Savoury Mince  
    Cottage Pie  
    Meatloaf  
    Meat Pastie 1
    Lamb Curry 1
    Minted Lamb Casserole  
    Traditional Irish Stew  
    Pork & Apple Casserole  
    Ham & Potato Bake  
    Sweet & Sour Pork  
    Ham & Steak Pineapple  
    Penne Carbonara 1
    Chicken Chop Suey  
    Chicken Curry  
    Chicken Lasagne  
    Chicken Patties 1
    Chicken & Spaghetti  
    Creamy Mustard Chicken  
    Chicken Cacciatore 2
    Mushroom Chicken  
    Apricot Chicken  
    Sweet & Sour Chicken  
    Crumbed Fish (No Sauce)  
    Crumbed Fish & Seafood Sauce  
    Crumbed Fish & Cheese  
    Crumbed Fish & Tartare Sauce 1
    Crumbed Fish & Fresh Lemon 2
    Baked Fish (uncooked)  
    Crumbed Fish & Sweet & Sour Sauce  
    Fish & Parsley (uncooked)  
    Tuna Patties  
    Tuna Mornay  
    Frittata  
    Chick Pea Casserole  
    Vegetable Open Pie  
    Vegetable Pastie  
    Savoury Stuffed Potato  
    Macaroni Cheese  
    Vegetable Lasagne  
    Spinach Ravioli in Italian Sauce  
    Vegetable Fritters  
    Creamy Pumpkin  
    Minestrone  
    Chicken & Corn  
    Potato & Leek  
    Pea & Ham  
    Details  
    Alternative Selection  
    Comments  
     
         

     

    And would like it to look like this:

     

     

    Order Details
    Full Name
    Philip Parsons
    Phone Number
    0406077367
    E-mail
    philip.parsons@woodsbagot.com
    Street Address
    c/- Woods Bagot
    Suburb
    342-344 Murray Street
    Postcode
    6000
    Delivery Date
     Monday, April 02, 2012
    Diabetic
    Yes
    Food Allergies
    No
    Order Number
    HCO-0000000082
    Regular Meals
    * Denotes NOT suitable for Diabetics
    Large Meals
    * Denotes NOT suitable for Diabetics
    Roast Beef
    1
    Roast Chicken Drumsticks
    1
    Steak Mince Pie
    1
    Spaghetti & Italian Meatballs
    1
    Veal Schnitzel
    2
    Corned Beef with Parsley Sauce
    1
    Beef Curry
    1
    Beef Stroganoff
    2
    Spaghetti Bolognaise
    1
    Hearty Mince Casserole
    1
    Meat Pastie
    1
    Lamb Curry
    1
    Penne Carbonara
    1
    Chicken Patties
    1
    Chicken Cacciatore
    2
    Crumbed Fish & Tartare Sauce
    1
    Crumbed Fish & Fresh Lemon
    2
    Soups
    Details

    If we could get this working like this, We will probably need to go up to the professional plan as well and I could can also see a few other clients looking for the same functionality.

    Are you able to tell me if this is going to happen becasue if not I believe we will have to look elsewhere.

  • Profile Image
    JotForm Support

    Answered by jonathan on April 12, 2012 at 08:11 AM

    homechef,

    I fully understand what we are up to here. By default, this is the expected result of JotForm's E-mail Notification. I wish there was on out-of-the-box feature that matches your requirement at once.
    And surely this is quite a challenge to make it happen right now.

    BUT, if you can allow me at least day to come up with a resolution for you, I will spend effort for it.
    I am looking at using the form's source code to change its functionalities.

    Please inform me if you are willing to wait and I'll try my best to work on it.

    Thanks.

  • Profile Image

    Answered by homechef on April 12, 2012 at 08:41 AM

    Thanks for your response, I can understand that it isn't meant to work out of the box but would appreciate if there was a resolution you could offer.

     

    I am more than willing to wait to what what you can do for me.

     

    Thanks

  • Profile Image
    JotForm Support

    Answered by jonathan on April 12, 2012 at 08:51 AM

    Thank you for your patience.
    I will work on it and give you update as soon as I have it.

  • Profile Image
    JotForm Support

    Answered by jonathan on April 14, 2012 at 03:39 AM

    Hello homechef,

    As committed the last time, here is the demo form.

    I used the source code of your cloned form and applied some javascript functions to meet the requirements. Try using the Order form as normal, and upon submission, you can check the customized email notification here . Use 'homechef001' for the Inbox name.

    The E-mail notification content should exclude empty selection drop downs.
    If you find this useful, I can assist you to implement it on your end.

    Thanks. 

  • Profile Image

    Answered by homechef on April 14, 2012 at 06:05 AM

    Hi Jonathan,

     

    That is almost exactly what I am after, I would just need a line of text inbetween the sections stating whether it is a regular or large meal.

     

    But if you could help me to implement this it would be greatly appreciated.

  • Profile Image
    JotForm Support

    Answered by abajan on April 14, 2012 at 07:14 AM

    Hi Rob

    To reply on behalf of Jonathan, I believe that you would just need to insert those lines into the notification by clicking the first "Roast Beef" line, clicking the "Insert row before" button and then typing "Regular Meals" in the new row. The first part of this process is illustrated below:


    Do likewise with the other sections: Click the row before which the "Large Meals" heading should go and follow the same procedure and finally, do the same for "Soups".

    Please be aware that once the table in the Compose Email section of an email alert (whether it be a notification or autoresponder) has been edited, it becomes "dirty", which means that from that point forward it will no longer be automatically updated with changes made on the form (field deletions, additions, changes to field titles and so on). This is not a major problem though because you would just need to manually update the alert.

    But I'm getting ahead of myself. You first need to copy all of the source code of Jonathan's demo form and then do the following:

    1. On line 87 change the value of the action attribute from "http://submit.jotform.me/submit/21023043158440/" to "http://submit.jotform.co/submit/20840526566859/"

    2. Change all seven (7) instances of 21023043158440 to 20840526566859

    3. Save the updated code and paste it into a web page of your own. (If you don't have a website, I can recommend a few.)

    If you would like additional help with this, be sure to let us know.


    ~ Wayne

  • Profile Image
    JotForm Support

    Answered by abajan on April 14, 2012 at 07:32 AM

    Actually, it looks like you don't need to change your notification at all. Just make the changes to the demo source and it should work (knock wood! :)

  • Profile Image

    Answered by homechef on April 14, 2012 at 09:45 PM

    Hi,

     

    It looks to work on the test form but not on the one I cloned from it, The form is located here http://users.tpg.com.au/roberica/Order.html it seems to work on a "clean" email notification but as soon as I add headings it doesn't filter out the blank rows.

     

    See http://homechef001.mailcatch.com The third one was done with a clean email notification the second with me adding headings and the first after removing the headings.

     

  • Profile Image
    JotForm Support

    Answered by abajan on April 14, 2012 at 10:00 PM

    Yes, I have been having problems getting this to work myself. However, since it's Jonathan who provided the script that's supposed to make this auto hiding stuff work, I'll leave it to him to figure out a workaround (unless, of course, one of my other colleagues can suggest something.)

    One thing is certain. If we can get this to work properly and our developers integrate into the form builder, Jonathan will become an instant hero because this is one of those oft requested features.

    I'm eagerly looking forward to Jonathan's reply... with bated breath :)

  • Profile Image
    JotForm Support

    Answered by jonathan on April 14, 2012 at 10:21 PM

    Hello,

    You are correct, if you alter the E-mail Notification(modified, edit) the custom javascript function will not work on the submission anymore. BUT I think this is the default behaviour of JotForm. It only considers the existing fields on the form when the notification was first created. If you alter the notification, the changes you made are not recognize anymore outside the form email process.

    Anyway, I will not complicate this with the details anymore.

    Can you please confirm that what you wanted added on the custom Notification is to have a persistent 3 text message separator on email message (that is Regular Meals, Large Meals, and Details). I saw this on your notification email setup.

    The clue here is, since the modified email notification will not work, -- is to add this 'separator' on the form itself, then when the Notification is created, they should be there as an available field.

    Pleasee confirm if this is the change you wanted applied? then I will try to apply it on the demo form.

    Thanks.

  • Profile Image

    Answered by homechef on April 14, 2012 at 10:45 PM

    Hi Jonathan,

     

    I am after labels for the regular meals, large meals and soups section.

     

    I also noticed that the Full Name field up the top is having it's space removed when it is emailed through, To First Last would end up FirstLast on the email.

     

    Thanks!

  • Profile Image
    JotForm Support

    Answered by jonathan on April 14, 2012 at 10:55 PM

    Ok thanks for the update. I will try what I can come up for this.

    As for the FirstLast on the email, it was not like this on the demo form... if you can still catch it, I tested just now on the homechef001 mail.. the names are properly display with space in between.

    Will be back soonest.

  • Profile Image
    JotForm Support

    Answered by jonathan on April 15, 2012 at 12:28 AM

    Hi homechef,

    You may now preview a compact version here. I had to result to added injected CSS to produce the custom text headers on the E-mail message. The submission email is still @ http://homechef001.mailcatch.com .

    We have to accept we are doing a hack job here, so, we are limited on some of the presentations we want. BUT I have colleagues here who are master @ CSS, I am sure the hidden text header separators can be enhance further more than what I come up with.

    The key here is, everything should be in the form(styles, design). Never alter the compose Notification email.

    Please inform us on your updates. Thanks.

  • Profile Image

    Answered by homechef on April 15, 2012 at 01:30 AM

    Hi Jonathan,

     

    Thanks a lot, That looks to be exactly what I am after except the missing fields.

     

    Are you able to assist me in doing this to my form?

  • Profile Image
    JotForm Support

    Answered by jonathan on April 15, 2012 at 01:59 AM

    Ok. I will clone your final form. Afterwards, you may want to clone it back to get the custom text box I used as headers and the CSS.

    I will get back to you when I have this. Thanks.

  • Profile Image
    JotForm Support

    Answered by jonathan on April 15, 2012 at 03:58 AM

    Hi,

    Please check the latest version of the form here.
    I cloned your Form and used it for this source.

    The custom notificaiton should at least look like this screen.

     

    How to use it.

    1. Clone this form. To get the text header separator and injected CSS.

    2. Go to E-mail alert, delete the existing Notification then create/add a new one.

    3. You can change the notification recipient, sender, title... Just don't edit the compose message body.

    4. Save the Form and exit

    5. In My Forms, preview your form

    6. In the preview window, Right-Click on your form to get the source code (view source code)

    7. Copy the source code (right click, select all, copy), then Paste it on your html (order.html)

    8. Edit order.html source code. Before the /head tag, paste this javascript code

    ** Edit : In the javascript code you have to replace the form id used "123456789" with your own form ID. Read the //comment regarding the form ID

    9. Look for the 'submit' button way below the source code of order.html. 

    10. Look for this code form-submit-button-simple_white" onclick="checkFileFields();">, Add the "onclick" event.. see yellow highlighted code.

    Save the Order.html (or any name) .Preview the page and test the functions.

    Please inform us if you need more assistance. We're here to assist you.

    Thanks.

  • Profile Image
    JotForm Support

    Answered by jonathan on April 15, 2012 at 04:29 AM

    I have edit on the steps. Please check step 8..
    Thanks 

  • Profile Image

    Answered by homechef on April 15, 2012 at 04:32 AM

    Hi Jonathan,

     

    I just followed the instructions as above but the form doesn't seem to be submitting the data back to jot form, I'm not sure where the issue is but here is my form that i created. http://users.tpg.com.au/roberica/Order.html

  • Profile Image
    JotForm Support

    Answered by jonathan on April 15, 2012 at 05:11 AM

    Hi,

    I sent you an email instead, with the attached correct source code.
    I think the source code is not getting correctly on your Order.html

    Please check the email with attachement and instruction how to replace your Order.html.

    Once you get this going, it will be using the Clone of 0415 Home Chef form. So, if you need to change the Notification email addresses, you can do it on this form (currently you set it up to homechef001 still)

    I will be monitoring this link http://users.tpg.com.au/roberica/Order.html to see if you got it going.

    Thanks.

  • Profile Image

    Answered by homechef on April 15, 2012 at 05:27 AM

    Hi Jonathan,

     

    I just replaced Order.html with the copy you gave me and it still doesn't seem to be working.

     

    Can you confirm that the code is the same?

  • Profile Image

    Answered by homechef on April 15, 2012 at 05:31 AM

    Jonathan,

     

    It looks like my browser was caching it.

     

    It seems to be working but I didn't get a space in the fuill name, Can can see it here http://homechef001.mailcatch.com.

  • Profile Image
    JotForm Support

    Answered by jonathan on April 15, 2012 at 05:39 AM

    Yes its working now =).

    I did noticed also the no space this time. But in my form I tried this several times, there is no such issue. There must be something on your form that is causing this...

    I know your form is tough act... =) but we may not have a choice but to create brand new one? Or better, create compact version of your form first.. then practice implementing the source code method to get the hang of the function.

    It easy to implement the source code actually. The steps I gave above can be shorten to 3-4 once you have the form.

    Thanks.

  • Profile Image

    Answered by barq on June 19, 2012 at 09:11 AM

    Hi Jonathan,

    Any general way to apply this technique to other forms for other Jotform users? I'm actually sitting with the exact same problem (doing a job application form with lot's of IF-THEN logic in it), and I can't see how to customize your code to make it work here. Maybe 75% of the fields I receive are empty, so it could be great to hide those fields.

    All the best

    Anders

  • Profile Image
    JotForm Support

    Answered by jonathan on June 19, 2012 at 09:47 AM

    Hi Anders,

    We can always try it on your form. =)

    This resolution I offered to homechef seem long ago already. I aim to improve on it also. There were some steps that I should have improved.

    The keys to note here are:

    1. You have to use source code embed of your form. Because of the custom javascript function needed.

    2. I remembered that the email notification should not be altered anymore once the form was embedded. The form seems to ignore the custom function once you modified/edited the email notification in jotform.

    3. This code http://pastie.org/4114407 was the primary component of the function.

    Please try creating a new post using this link here. I will check how we can apply it on your form.

    Thanks.

  • Profile Image

    Answered by barq on June 19, 2012 at 10:03 AM

    Hi Jonathan,

    Thanks for your quick answer! Here's my new post:

    http://www.jotform.com/answers/108058-How-do-to-hide-unused-fields-in-submission-e-mails

    All the best

    Anders

  • Profile Image
    JotForm Support

    Answered by kenneth on March 23, 2013 at 04:46 AM

    Hi,

    We have a new feature in jotform. This is the "Hide Empty Fields on Emails" from advance tab under Preferences. Have you tried these already? Please confirm if these works in your side.

    Note: if the email alert has been edited, it becomes now 'dirty' if how we call it. Which means the said feature will not be work anymore, unless you recreate the email alert.

    Thank you,
    Kenneth 

  • Profile Image

    Answered by Bellabridalboutique on June 20, 2015 at 12:08 PM

    Hello,

    In reference to the last post by Kenneth, is it possible to enable the "hide empty fields on emails" preference if you have made changes to the email alerts? How would you recreate the alert so that it is no longer "dirty" and still keep all the fields you need that are on your form?

     

    Thanks,

    Heather

  • Profile Image
    JotForm Support

    Answered by jonathan on June 20, 2015 at 05:52 PM

    Hi Heather,

    We will attend to your inquiry separately here http://www.jotform.com/answers/592850

    Thanks.

  • Profile Image

    Answered by b.m.ezzat on July 18, 2015 at 09:30 AM

    where and how to edit order.html

    am having almost similar form and need to hide the empty fields in customized mail

    http://form.jotformpro.com/form/51954821304958

    Here is my form

  • Profile Image
    JotForm Support

    Answered by abajan on July 18, 2015 at 03:23 PM

    @b.m.ezzat Your question has been moved to a separate thread, so that we can better attend to it. You can find the thread here: http://www.jotform.com/answers/613661

    It will be dealt with shortly.

    Thanks