Skip to content

Instantly share code, notes, and snippets.

@estefanionsantos
Last active October 20, 2022 16:13
Show Gist options
  • Save estefanionsantos/4fcc87c0c7611072c08b3bc2b41a1af8 to your computer and use it in GitHub Desktop.
Save estefanionsantos/4fcc87c0c7611072c08b3bc2b41a1af8 to your computer and use it in GitHub Desktop.
input element
<?php
use Rubricate\Element\CreateElement;
$firstName = new CreateElement('input');
$firstName->setAttribute('type', 'text');
$firstName->setAttribute('name', 'firstName');
$firstName->setAttribute('class', 'form');
$firstName->setAttribute('required');
echo $firstName->getElement();
/*
<input type="text" name="firstName" class="form" required />
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment