This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form-group"> | |
<div class="col-sm-1"> | |
<label for="answer1">Answer 1</label> | |
</div> | |
<div class="col-sm-1"> | |
<input name="answers[]" id="answer1" class="form-control"> | |
</div> | |
<div class="col-sm-10"> | |
<input type="checkbox" name="correct" id="correct1" value="1"> <label for="correct1">Correct?</label> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# AppBundle/Entity/Category.php ================================================================================================ | |
namespace AppBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* Category | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function newAction(Request $request) | |
{ | |
$form = $this->createFormBuilder() | |
->setMethod('POST') | |
->setAction($this->generateUrl('admin_pic_new')) | |
->add('images', FileType::class, [ | |
'data_class' => null, | |
'multiple' => true, | |
'required' => true, | |
'label' => false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/config/config.yml ======================================================================================================== | |
#... | |
fos_user: | |
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel' | |
firewall_name: main | |
user_class: AppBundle\Entity\User | |
registration: | |
form: | |
type: AppBundle\Form\RegistrationType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @Route("/submit", name="submit") | |
* @Method("POST") | |
*/ | |
public function submitAction(Request $request) | |
{ | |
$person = new Person(); | |
$form = $this->createForm(PersonType::class, $person); | |
$form->handleRequest($request); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ENTITY | |
<?php | |
namespace AppBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Person |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>center div</title> | |
<style> | |
div#wrapper{ | |
height: 100vh; | |
display: flex; | |
flex-direction: column; |