gravitywiz/faker

A class for generating fake entry data for Gravity Forms forms. Note, this class does not actually create the entries.

1.0.0 2024-10-07 18:45 UTC

This package is auto-updated.

Last update: 2024-11-07 19:13:47 UTC


README

A class for generating fake entry data for Gravity Forms forms. Note, this class does not actually create the entries.

Installation

Note: We recommend using Jetpack Autoloader to help prevent conflicts.

composer require gravitywiz/faker

Usage

<?php
$gwiz_faker = new \GWiz_Faker();
$form = GFAPI::get_form( 123 );
$entries_to_generate = 10;

for ( $i = 0; $i < $entries_to_generate; $i++ ) {
	$entries[] = $gwiz_faker->generate_entry( $form );
}

// Add the entries to the database.
foreach ( $entries as $entry ) {
	GFAPI::add_entry( $entry );
}