ameos/ameos_form

This extension provides a form api for TYPO3 extension based on extbase and fluid with validation, list, search form, etc.

Installs: 456

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 2

Open Issues: 0

Type:typo3-cms-extension

1.4.7 2020-10-21 15:10 UTC

This package is auto-updated.

Last update: 2021-04-21 16:10:22 UTC


README

Form api for extbase and TYPO3

Example

$mymodel = $this->myModelRepository->findByUid($modelIdentifier);

$form = \Ameos\AmeosForm\Form\Factory::make('tx_myplugin', $mymodel);
$form->add('name', 'text')->addConstraint('name', 'required', 'Name is mandatory');
$form->add('email', 'email')->addConstraint('email', 'email', 'Email is not valid');
$form->add('submit', 'submit', array('label' => 'Send'));

if($form->isSubmitted()) {
	$form->bindRequest($this->request);
	if($form->isValid()) {
		
		$this->myModelRepository->add($mymodel);
		
		$this->addFlashMessage('New record created');
		$this->redirect('index')
	}
}

$this->view->assign('form', $form);

Documentation

You can find all the documentation on the typo3 extension repository

http://docs.typo3.org/typo3cms/extensions/ameos_form/