PHP code example of zored / reverse-form

1. Go to this page and download the library: Download zored/reverse-form 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/ */

    

zored / reverse-form example snippets


return array(
    'modules' => array(
        // ...
        'ReverseForm',
    ),
    // ...
);

    $this->form->setAttribute('action', $this->url('album', array('action' => 'test-form')));
    $formRenderer = $this->formRenderer($form, 'renderer.uniform', 'vertical'); // vertical or horizontal
    $formRenderer->prepare(); // this is how you create it in your viewscript

    $this->form->setAttribute('action', $this->url('album', array('action' => 'test-form')));
    $formRenderer = $this->formRenderer($form, 'renderer.bootstrap', 'vertical'); // vertical or horizontal
    $formRenderer->prepare(); // this is how you create it in your viewscript

	<h1>Form Testing</h1>
	
	$form = $this->form;
	$form->setAttribute('action', $this->url('album', array('action' => 'test-form')));
	$formRenderer = $this->formRenderer($form, 'renderer.uniform', 'horizontal');
	$formRenderer->prepare();
	echo $formRenderer->openTag();
	

    $form = new ReverseForm\Form\TestForm();

    if ($this->getRequest()->isPost()) {

        $form->setInputFilter(new InputFilter);

        $form->setData($this->getRequest()->getPost());

    }

    return array('form' => $form, 'post' => $this->getRequest()->getPost());
bash
$ php composer.phar update