Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Hirusha Cooray

    (@hirushacooray)

    Hi,

    If anyone get this issue in the future, you can solve it by adding this foreach loop.

    $data = array();
    	foreach( $form[ 'fields' ] as $field_id => $field){
    		$data[ $field['slug'] ] = Caldera_Forms::get_field_data( $field_id, $form );
        }
    Thread Starter Hirusha Cooray

    (@hirushacooray)

    Hi,

    Here is the modified code which ignores some field types.

    $data = array();
    	$ignore_field_types = array('html', 'section_break', 'button');
    
    	foreach( $form[ 'fields' ] as $field_id => $field){
    		if ( !in_array($field['type'], $ignore_field_types) ) {
    			$data[ $field['slug'] ] = Caldera_Forms::get_field_data( $field_id, $form );
    		}
        }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change ID to Slug in remote submission’ is closed to new replies.