Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RGFormsModel Questions Gravity Forms

What does RGFormsModel:: mean in Gravity forms? it notice that it's seems to always be calling function, but I'm just looking for a litte more clarification as a lot of documentation on GForms is very basic.

like image 659
Bill Murray Avatar asked May 18 '26 04:05

Bill Murray


1 Answers

the RGFormsModel class (deprecated in favor of GFFormsModel) is a simple class wrapper that contains a variety of functions used to interact with the forms. This class is in the process of being mostly gutted in favor of the GFAPI class which has a host of helpful functions when working with Gravity Forms.

Here is an example where I'm getting the form data where all the form and field settings are stored.

// old version
$form = GFFormsModel::get_form_meta( $form_id );

// new version
$form = GFAPI::get_form( $form_id );

Another useful function I use from the GFFormsModel class (same as RGFormsModel), is:

$input_type = GFFormsModel::get_input_type( $field );
like image 66
Dave from Gravity Wiz Avatar answered May 21 '26 00:05

Dave from Gravity Wiz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!