How to hide those empty fields on Drupal webform
Drupal webforms are great a way to create custom form in very short time. It let you post the results via email and it is also helps to conduct a poll or to receive feedbacks from your users. When you submit the webform, it displays all the submitted values on the next screen by default; it provides a view of the submitted values. Webform displays all the values along with the labels. If a field has a value of 0 (zero), then those fields only have labels on submission screen. These empty fields can be hidden by adding a condition in the files that are located at webform/components/ directory.
So, let’s have a look at how to do this with a number of fields in Drupal 7
First go to directory webform/components/ and then open number.inc.
Find _webform_display_number function
Now, rewrite the code as follows:
Doing this will hide the numeric fields if they do not have a value on submission page.
You can add this condition for other field types as well. You are required to look for function pattern _webform_display in all the files in components directory
Hope you find it useful for your use case. For any further clarification or any kind of assistance related to your website, please contact Valuebound!
Valuebound is a leading Drupal Development Company providing Enterprise Drupal web solutions. For more information on Drupal Development, contact us at info@valuebound.com
Valuebound - About Author:
Visit The Source Article: http://www.valuebound.com/blog/how-hide-those-empty-fields-drupal-webform
Article Source:
http://www.articleside.com/web-design-articles/how-to-hide-those-empty-fields-on-drupal-webform.htm
Related Web Design Articles
Published by Alisa Rozzy on March 13th 2012 | Web Design
Published by Devendra on January 24th 2012 | Web Design
Published by Sitikantha Pattnaik on June 12th 2012 | Web Design
Published by Devendra on January 24th 2012 | Web Design
Published by OsmicTechnologies on December 29th 2011 | Web Design
Published by EaseMyTrip on April 21st 2012 | Internet Business
Published by Devendra on February 23rd 2012 | Web Design
Published by Henrypeter on December 9th 2011 | Web Design
Published by Hannah Raasch on December 20th 2011 | Internet Business
Published by Brooke Mueller on July 2nd 2012 | Web Design
Published by Mark Wilston on March 5th 2012 | Web Design
Published by Brooke Mueller on April 25th 2012 | Web Design
Published by Brooke Mueller on July 2nd 2012 | Web Design
Published by Brooke Mueller on May 17th 2012 | Web Design
Published by Nelson on April 25th 2012 | Web Design
Published by Sam Aaron on December 8th 2011 | Web Design
Published by Devendra on February 2nd 2012 | Web Design