1. Go to this page and download the library: Download formr/formr library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
formr / formr example snippets
$form = new Formr\Formr();
$form = new Formr\Formr();
$form = new Formr\Formr('bootstrap');
$form = new Formr\Formr('bulma');
$form = new Formr\Formr('bootstrap');
$form->create_form('Name, Email, Comments|textarea');
$form = new Formr\Formr('bootstrap');
$form->form_open();
$form->create('First name, Last name, Email address, Age|number, Comments|textarea');
$form->submit_button();
$form->form_close();
$form = new Formr\Formr();
$form->fastform('contact');
$email = $form->post('email','Email|Please enter a valid email address','valid_email');
// include the Formr class
se Bootstrap 4 as our form wrapper
$form = new Formr\Formr('bootstrap');
// make all fields as at least 10 characters
$form->validate('Message(min[10])');
// let's email the form
$to = '[email protected]';
$from = '[email protected]';
$subject = 'Contact Form Submission';
// this processes our form, cleans the input, and sends it as an HTML email
if($form->send_email($to, $subject, 'POST', $from, 'HTML'))
{
// email sent; print a thank you message
$form->success_message('Thank you for filling out our form!');
}
}
html
<div class="my-wrapper-class">
$form->text('name', 'Name');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.