ameos/ameos_form

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

Installs: 556

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 4

Open Issues: 0

Type:typo3-cms-extension

2.1.0 2024-01-16 09:55 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/