5 if ( ! defined(
'GRAVITYVIEW_DIR' ) ) {
30 if ( empty( $configuration[
'id'] ) || ! is_numeric( $configuration[
'id'] ) ) {
31 gravityview()->log->error(
'Invalid configuration[id] supplied: {id}', array(
'data' => $configuration,
'id' => \
GV\Utils::get( $configuration,
'id' ) ) );
35 if ( empty( $configuration[
'form_id'] ) || !
$form = \
GV\GF_Form::by_id( $configuration[
'form_id'] ) ) {
36 gravityview()->log->error(
'Invalid configuration[form_id] supplied: {form_id}', array(
'data' => $configuration,
'form_id' => \
GV\Utils::get( $configuration,
'form_id' ) ) );
40 $field = self::by_id(
$form, $configuration[
'id'] );
43 gravityview()->log->error(
'Invalid configuration: Field not found by [id] supplied: {id}', array(
'data' => $configuration,
'id' => \
GV\Utils::get( $configuration,
'id' ) ) );
47 $field->update_configuration( $configuration );
61 if ( !
$form || ! is_object(
$form ) || ! is_a(
$form,
'\GV\GF_Form' ) ) {
62 gravityview()->log->error(
'$form is not a \GV\GF_Form instance', array(
'data' =>
$form ) );
66 if ( empty(
$form->form ) ) {
67 gravityview()->log->error(
'$form is not initialized with a backing Gravity Forms form' );
75 gravityview()->log->error(
'Invalid $field_id #{field_id} for current source', array(
'data' =>
$form,
'field_id' =>
$field_id ) );
100 if ( ! $this->show_label ) {
104 if (
$label = parent::get_label( $view, $source,
$entry, $request ) ) {
108 if ( ! $source || ! is_object( $source ) || ! is_a( $source,
'\GV\GF_Form' ) ) {
109 gravityview()->log->error(
'$source is not a valid \GV\GF_Form instance', array(
'data' => $source ) );
113 if ( $this->label ) {
118 if ( $input = \GFFormsModel::get_input( $this->field, $this->ID ) ) {
119 $label = ! empty( $input[
'customLabel'] ) ? $input[
'customLabel'] : $input[
'label'];
122 $label = $this->field->get_field_label(
true, $this->label );
142 gravityview()->log->error(
'$entry is not a valid \GV\GF_Entry instance', array(
'data' =>
$entry ) );
149 return $this->get_value_filters(
$value, $view, $source,
$entry, $request );
162 if (
$value = parent::__get( $key ) ) {
166 if ( $this->field ) {
167 return $this->field->$key;
If this file is called directly, abort.
get_value(View $view=null, Source $source=null, Entry $entry=null, Request $request=null)
Retrieve the value for this field.
If this file is called directly, abort.
if(gravityview() ->plugin->is_GF_25()) $form
static by_id( $form, $field_id)
Get a by and Field ID.
If this file is called directly, abort.
static from_configuration( $configuration)
Create self from a configuration array.
get_label(View $view=null, Source $source=null, Entry $entry=null, Request $request=null)
Retrieve the label for this field.
If this file is called directly, abort.
If this file is called directly, abort.
gravityview()
The main GravityView wrapper function.
If this file is called directly, abort.
if(false !==strpos( $value, '00:00')) $field_id
string $field_id ID of the field being displayed
__get( $key)
A proxy getter for the backing GravityView field.