Skip to content

Composer package for generating fake Gravity Forms entries

Notifications You must be signed in to change notification settings

gravitywiz/faker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gravity Wiz Faker Packagist Version

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 );
}

About

Composer package for generating fake Gravity Forms entries

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages