how to get the value of a custom field in gravity forms settings on frontend using javascript

244 Views Asked by At

I created a new settings in Gravity Forms using this code below.

add_filter( 'gform_form_settings_fields', function ( $fields, $form ) {
    $fields['form_basics']['fields'][] = array( 'type' => 'text', 'label' => ' Api Key','name' => 'dev_api_key','placeholder' => 'Enter Dev API KEY!','tooltip' => 'Enter Dev Api Key' );
  
    return $fields;
}, 10, 2 );

How can i get the value of this field on frontend using gform_post_render or any other hooks in js?

I have tried quite a few options available in gravity forms docs but no luck.

1

There are 1 best solutions below

0
Usman On

Found an answer myself, you can use gform_form_post_get_meta

https://docs.gravityforms.com/gform_form_post_get_meta/