Skip to content

Instantly share code, notes, and snippets.

@estefanionsantos
Created September 8, 2021 01:59
Show Gist options
  • Save estefanionsantos/a59dbb7b3c1fa453e0b7ea049506af92 to your computer and use it in GitHub Desktop.
Save estefanionsantos/a59dbb7b3c1fa453e0b7ea049506af92 to your computer and use it in GitHub Desktop.
input form rubricate
<?php
use Rubricate\Form\InputForm;
$name = new InputForm('text', 'name', 'john');
$email = new InputForm('email', 'email', '[email protected]');
$password = new InputForm('password', 'password', '123456');
$age = new InputForm('number', 'age', '25');
$phone = new InputForm('tel', 'phone', '5551999999');
echo PHP_EOL;
echo $name->getElement() . PHP_EOL;
echo $email->getElement() . PHP_EOL;
echo $password->getElement() . PHP_EOL;
echo $age->getElement() . PHP_EOL;
echo $phone->getElement() . PHP_EOL;
/*
<input type="text" name="name" value="john" />
<input type="email" name="email" value="[email protected]" />
<input type="password" name="password" value="123456" />
<input type="number" name="age" value="25" />
<input type="tel" name="phone" value="5551999999" />
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment