gform_field_advanced_settings

gform_field_advanced_settings

IntroductionUsageParametersExamplesPlacementSource Code

Introduction
Use this filter to create a new field setting under the Advanced tab. Useful when implementing a new custom field type that requires custom settings.
Usage
1add_action( 'gform_field_advanced_settings', 'my_advanced_settings', 10, 2 );

Parameters

$position integer
Specifies the position that the settings will be displayed. For a list of all available positions, search form_detail.php for 「gform_field_advanced_settings」 or review the Advanced Field Settings article.

$form_id integer
The ID of the form from which the entry value was submitted.

Examples
This example creates a new Advanced setting on position 50 (right after the Admin Label setting), that specifies if the field data should be encrypted. This code sample works in Gravity Forms 2.4, 2.5 and later.
1234567891011121314151617181920212223242526272829303132333435add_action( 'gform_field_advanced_settings', 'my_advanced_settings', 10, 2 );function my_advanced_settings( $position, $form_id ) {    //create settings on position 50 (right after Admin Label)    if ( $position == 50 ) {        ?>        

  •                                 
  •                 EncryptionCheck this box to encrypt this field's data";    return $tooltips;}
    Placement
    This code should be placed in the functions.php file of your active theme.
    Source Code
    This filter is located in form_detail.php.

    发表回复

    您的邮箱地址不会被公开。 必填项已用 * 标注