Last active
August 29, 2015 14:16
-
-
Save ksnider/012b9b0567e544154504 to your computer and use it in GitHub Desktop.
This script will allow you to use a regular field snippet but have it appear hidden on the web form when displayed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Instructions: | |
In the code below, replace the REPLACE WITH INFUSIONSOFT FIELD NAME with a # and the ID | |
of the field(s) you want to hide. | |
For example, if you were hiding the Email field, you would replace it with #inf_field_Email and the | |
code would look like this: | |
jQuery('#inf_field_Email').parent().parent().hide(); // Be sure to leave single quotes in place | |
jQuery('label[for=#inf_field_Email]').parent().parent().hide(); | |
If you were hiding a custom field named TestField, you would replace it with #inf_custom_TestField and the | |
code would look like this: | |
jQuery('#inf_custom_TestField').parent().parent().hide(); // Be sure to leave single quotes in place | |
jQuery('label[for=#inf_custom_TestField]').parent().parent().hide(); | |
Modify the code below then copy and paste it into an HTML area on your webform. | |
*/ | |
<script type="text/javascript"> | |
$ = jQuery; | |
$(document).ready(function () { | |
jQuery('REPLACE WITH INFUSIONSOFT FIELD NAME').parent().parent().hide(); // Hides the field | |
jQuery('label[for=REPLACE WITH INFUSIONSOFT FIELD NAME]').parent().parent().hide(); // Hides the field label | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment