-
Notifications
You must be signed in to change notification settings - Fork 0
Sinjonathan/FormMakerPlugin
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
FormMakerPlugin @author Sebastien Joly @author Jonathan Santoni Presentation ************************* This plugin for PHP project exist for facilitated the creation of form based on database Installation ************************* Step 1 : Import plugin in yours project with this command line ~$ git clone https://github.com/Sinjonathan/FormMakerPlugin.git Step 2 : When you need to make a form, add in the top of the file use Core\Entity\Form; include 'CURRENT_LOCATION_TO_PLUGIN_PATH/FormMakerPlugin/start.php'; Step 3 : In the header of the file add loadFormMakerPluginInfo("CURRENT_LOCATION_TO_PLUGIN_PATH/FormMakerPlugin"); Step 4 : Initialize form variable $form = new Form("CURRENT_LOCATION_TO_PLUGIN_PATH/FormMakerPlugin"); $form->init(host,databaseType,databaseName,databaseTable,user,password); Step 5 : Add yours fields, set options use $form->addField(...), $form->isUpdateForm(...), ... Step 6 : Show the form $form->show(); Config example *********************** In a project Test structured like this : Test/ - TestFolder/ - TestInFolder.php - TestOutFolder.php Import project Test/ - FormMakerPlugin - TestFolder/ - TestInFolder.php - TestOutFolder.php In TestInFolder.php include '../FormMakerPlugin/start.php'; loadFormMakerPluginInfo("../FormMakerPlugin"); $form = new Form("../FormMakerPlugin"); In TestOutFolder.php include './FormMakerPlugin/start.php'; loadFormMakerPluginInfo("./FormMakerPlugin"); $form = new Form("./FormMakerPlugin"); Recommendation *********************** Be sure the /temp folder have the write permission else the plugin don't work
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published