Skip to main content

GFWidget

Class GFWidget

Facilitates the creation of the Gravity Forms widget

See Also

  • WP_Widget

Source: widget.php:23

Details

  • Kind: class
  • Namespace: (global)
  • Extends: WP_Widget

Methods

MethodDescription
__construct()GFWidget constructor.
widget()Handles outputting of the widget content
update()Handles updates to the widget content
form()Outputs the form options for the widget

Method Reference

__construct()

function __construct()

GFWidget constructor.

See Also

  • WP_Widget::__construct

Source: widget.php:29

widget()

function widget( $args, $instance )

Handles outputting of the widget content

Parameters

NameTypeDefaultDescription
$argsarrayArguments provided to the widget
$instancearraySaved database values for the widget

See Also

  • WP_Widget::widget
  • RGFormsModel::get_form_meta
  • GFForms::print_form_scripts
  • GFForms::get_form

Source: widget.php:56

update()

function update( $new_instance, $old_instance )

Handles updates to the widget content

Parameters

NameTypeDefaultDescription
$new_instancearrayThe new instance of the widget
$old_instancearrayThe old instance of the widget

Returns

  • array — The widget instance, after changes have occurred

Source: widget.php:113

form()

function form( $instance )

Outputs the form options for the widget

Parameters

NameTypeDefaultDescription
$instancearrayThe widget instance

Returns

  • void

Source: widget.php:133