caldera_forms_allow_edit_hidden_fields

When editing a form from entry viewer, convert hidden fields to text fields to so they too can be edited.

Description

caldera_forms_allow_edit_hidden_fields( (array) $field ); 

Parameters (1)

0. $field (array)
Field config

Usage

  1. if ( !function_exists( 'caldera_forms_allow_edit_hidden_fields' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'caldera-forms/includes/field_processors.php'; 
  3.  
  4. // Field config 
  5. $field = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = caldera_forms_allow_edit_hidden_fields($field); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/field_processors.php  
  1. function caldera_forms_allow_edit_hidden_fields( $field ) { 
  2. if( ( ! empty( $_GET[ 'modal' ] ) && 'view_entry' == $_GET[ 'modal' ] ) || ( ! empty( $_POST[ '_cf_frm_edt' ] ) ) ) { 
  3. $field[ 'type' ] = 'text'; 
  4. return $field; 
  5. };