Hey Ralf, in this piece of the code here:
add_action("gform_editor_js", "editor_script");
function editor_script(){
?>
<script type='text/javascript'>
//adding setting to fields of type "text" and "radio"
fieldSettings["radio"] += ", .encrypt_setting";
fieldSettings["text"] += ", .encrypt_setting";
//binding to the load field settings event to initialize the checkbox
jQuery(document).bind("gform_load_field_settings", function(event, field, form){
jQuery("#field_encrypt_value").attr("checked", field["encryptField"] == true);
});
</script>
<?php
}
All you need to do is add the field types you'd like to apply this to. You can see above I added:
fieldSettings["radio"] += ", .encrypt_setting";
Hope this helps!
Posted 12 years ago on Wednesday March 7, 2012 |
Permalink