Form is Not submitted. No errors are shown












0















I've trouble with form



The form is not being submitted when I submit it. No errors are shown.



I fill the field and yet when I check the profiler in form section it says form was not submit:



Option  Passed Value    Resolved Value
action

"/Symfony/web/app_dev.php/auth/fr/user/add"

same as passed value
data

Annonce {#4948 ▼
-id: null
-prix: null
-datepublication: DateTime @1520793937 {#5015 ▶}
-auteurId: 1
-titre: null
-auteurName: null
-contenu: null
-ville: null
-categorie: null
-nbplace: null
-commentaires: ArrayCollection {#5014 …}
}

same as passed value


here the controller method bind to:



amespace CPCocolocBundleController;
use SymfonyBundleFrameworkBundleControllerController;
use SensioBundleFrameworkExtraBundleConfigurationRoute;
use SymfonyComponentHttpFoundationRequest;
use SymfonyComponentHttpFoundationResponse;
use CPCocolocBundleEntitycommentaire;
use CPCocolocBundleEntityAnnonce;
use CPCocolocBundleFormAnnonceType;
use SymfonyComponentHttpKernelExceptionNotFoundHttpException;
use CPUserBundleEntityUser;
use SensioBundleFrameworkExtraBundleConfigurationSecurity;


/**
*@Route ("/auth/{_locale}")


*/



class AnnonceController extends Controller{


/**
* @Route("/user/add", name="addAnnonce")
* @return SymfonyComponentHttpFoundationResponse
* @throws LogicException
*/

public function newAction (Request $request){

$annonce = new Annonce();

$userId= $this->getUser()->getId();

$form = $this->createForm(AnnonceType::class, $annonce,[
'action'=>$this->generateUrl('addAnnonce')
]);

$annonce->setAuteurId($userId);
$form->handleRequest($request);
if (!$form->isSubmitted() || ! $form->isValid()){

return $this->render('@CPCocoloc/Annonce/new.html.twig',[
'form'=> $form->createView(),
]);
}

$em = $this->getDoctrine()->getManager();
$em->persist($annonce);
$em->flush();

$this->addFlash('notice', 'Annonce postée');

return $this->redirectToRoute('index');

}
}


here is the entity:



use DoctrineORMMapping as ORM;
use DoctrineCommonCollectionsArrayCollection;

/**
* Annonce
*
* @ORMTable(name="annonce")
* @ORMEntity(repositoryClass="CPCocolocBundleRepositoryAnnonceRepository")
*/
class Annonce
{
/**
* @var int
*
* @ORMColumn(name="id", type="integer")
* @ORMId
* @ORMGeneratedValue(strategy="AUTO")
*/
private $id;

/**
* @var float
*
* @ORMColumn(name="prix", type="float")
*/
private $prix;

/**
* @var DateTime
*
* @ORMColumn(name="Datepublication", type="datetime")
*/
private $datepublication;

/**
* @var int
*
* @ORMColumn(name="auteurId", type="integer")
*/
private $auteurId;

/**
* @var string
*
* @ORMColumn(name="titre", type="string", length=255)
*/
private $titre;

/**
* @var string
*
* @ORMColumn(name="auteurName", type="string", length=255)
*/
private $auteurName;

/**
* @var string
*
* @ORMColumn(name="contenu", type="text")
*/
private $contenu;

/**
* @var string
*
* @ORMColumn(name="ville", type="string", length=255)
*/
private $ville;

/**
* @var string
*
* @ORMColumn(name="categorie", type="string", length=255)
*/
private $categorie;

/**
* @var int
*
* @ORMColumn(name="Nbplace", type="integer")
*/
private $nbplace;

/**
*@ORMOneToMany(targetEntity="commentaire", mappedBy="annonce")
*/

private $commentaires;



public function __construct(){
$this->commentaires = new ArrayCollection();
$this->datepublication = new Datetime();
}


/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}

/**
* Set prix
*
* @param float $prix
*
* @return Annonce
*/
public function setPrix($prix)
{
$this->prix = $prix;

return $this;
}

/**
* Get prix
*
* @return float
*/
public function getPrix()
{
return $this->prix;
}

/**
* Set datepublication
*
* @param DateTime $datepublication
*
* @return Annonce
*/
public function setDatepublication($datepublication)
{
$this->datepublication = $datepublication;

return $this;
}

/**
* Get datepublication
*
* @return DateTime
*/
public function getDatepublication()
{
return $this->datepublication;
}

/**
* Set auteurId
*
* @param integer $auteurId
*
* @return Annonce
*/
public function setAuteurId($auteurId)
{
$this->auteurId = $auteurId;

return $this;
}

/**
* Get auteurId
*
* @return int
*/
public function getAuteurId()
{
return $this->auteurId;
}

/**
* Set auteurName
*
* @param string $auteurName
*
* @return Annonce
*/
public function setAuteurName($auteurName)
{
$this->auteurName = $auteurName;

return $this;
}

/**
* Get auteurName
*
* @return string
*/
public function getAuteurName()
{
return $this->auteurName;
}

/**
* Set titre
*
* @param string $titre
*
* @return Annonce
*/
public function setTitre($titre)
{
$this->titre = $titre;

return $this;
}

/**
* Get titre
*
* @return string
*/
public function getTitre()
{
return $this->titre;
}


/**
* Set contenu
*
* @param string $contenu
*
* @return Annonce
*/
public function setContenu($contenu)
{
$this->contenu = $contenu;

return $this;
}

/**
* Get contenu
*
* @return string
*/
public function getContenu()
{
return $this->contenu;
}

/**
* Set ville
*
* @param string $ville
*
* @return Annonce
*/
public function setVille($ville)
{
$this->ville = $ville;

return $this;
}

/**
* Get ville
*
* @return string
*/
public function getVille()
{
return $this->ville;
}

/**
* Set categorie
*
* @param string $categorie
*
* @return Annonce
*/
public function setCategorie($categorie)
{
$this->categorie = $categorie;

return $this;
}

/**
* Get categorie
*
* @return string
*/
public function getCategorie()
{
return $this->categorie;
}

/**
* Set nbplace
*
* @param integer $nbplace
*
* @return Annonce
*/
public function setNbplace($nbplace)
{
$this->nbplace = $nbplace;

return $this;
}

/**
* Get nbplace
*
* @return int
*/
public function getNbplace()
{
return $this->nbplace;
}


public function getCommentaires(){
return $this->commentaires;
}

public function addCommentaires(commentaire $commentaire){
$this->commentaires = $commentaire;
}
}


I created the form using the command. I manage to persist a user in the database.










share|improve this question

























  • is the page reloading after a hit on the submit button ? Is your HTML valid ?

    – Frank B
    Mar 11 '18 at 22:37











  • Yes you were right ! Thank you it was just my html that wasnt right.

    – mg175430
    Mar 12 '18 at 9:50











  • Yes you were right ! Thank you it was just my html that wasnt right.

    – mg175430
    Mar 12 '18 at 9:50
















0















I've trouble with form



The form is not being submitted when I submit it. No errors are shown.



I fill the field and yet when I check the profiler in form section it says form was not submit:



Option  Passed Value    Resolved Value
action

"/Symfony/web/app_dev.php/auth/fr/user/add"

same as passed value
data

Annonce {#4948 ▼
-id: null
-prix: null
-datepublication: DateTime @1520793937 {#5015 ▶}
-auteurId: 1
-titre: null
-auteurName: null
-contenu: null
-ville: null
-categorie: null
-nbplace: null
-commentaires: ArrayCollection {#5014 …}
}

same as passed value


here the controller method bind to:



amespace CPCocolocBundleController;
use SymfonyBundleFrameworkBundleControllerController;
use SensioBundleFrameworkExtraBundleConfigurationRoute;
use SymfonyComponentHttpFoundationRequest;
use SymfonyComponentHttpFoundationResponse;
use CPCocolocBundleEntitycommentaire;
use CPCocolocBundleEntityAnnonce;
use CPCocolocBundleFormAnnonceType;
use SymfonyComponentHttpKernelExceptionNotFoundHttpException;
use CPUserBundleEntityUser;
use SensioBundleFrameworkExtraBundleConfigurationSecurity;


/**
*@Route ("/auth/{_locale}")


*/



class AnnonceController extends Controller{


/**
* @Route("/user/add", name="addAnnonce")
* @return SymfonyComponentHttpFoundationResponse
* @throws LogicException
*/

public function newAction (Request $request){

$annonce = new Annonce();

$userId= $this->getUser()->getId();

$form = $this->createForm(AnnonceType::class, $annonce,[
'action'=>$this->generateUrl('addAnnonce')
]);

$annonce->setAuteurId($userId);
$form->handleRequest($request);
if (!$form->isSubmitted() || ! $form->isValid()){

return $this->render('@CPCocoloc/Annonce/new.html.twig',[
'form'=> $form->createView(),
]);
}

$em = $this->getDoctrine()->getManager();
$em->persist($annonce);
$em->flush();

$this->addFlash('notice', 'Annonce postée');

return $this->redirectToRoute('index');

}
}


here is the entity:



use DoctrineORMMapping as ORM;
use DoctrineCommonCollectionsArrayCollection;

/**
* Annonce
*
* @ORMTable(name="annonce")
* @ORMEntity(repositoryClass="CPCocolocBundleRepositoryAnnonceRepository")
*/
class Annonce
{
/**
* @var int
*
* @ORMColumn(name="id", type="integer")
* @ORMId
* @ORMGeneratedValue(strategy="AUTO")
*/
private $id;

/**
* @var float
*
* @ORMColumn(name="prix", type="float")
*/
private $prix;

/**
* @var DateTime
*
* @ORMColumn(name="Datepublication", type="datetime")
*/
private $datepublication;

/**
* @var int
*
* @ORMColumn(name="auteurId", type="integer")
*/
private $auteurId;

/**
* @var string
*
* @ORMColumn(name="titre", type="string", length=255)
*/
private $titre;

/**
* @var string
*
* @ORMColumn(name="auteurName", type="string", length=255)
*/
private $auteurName;

/**
* @var string
*
* @ORMColumn(name="contenu", type="text")
*/
private $contenu;

/**
* @var string
*
* @ORMColumn(name="ville", type="string", length=255)
*/
private $ville;

/**
* @var string
*
* @ORMColumn(name="categorie", type="string", length=255)
*/
private $categorie;

/**
* @var int
*
* @ORMColumn(name="Nbplace", type="integer")
*/
private $nbplace;

/**
*@ORMOneToMany(targetEntity="commentaire", mappedBy="annonce")
*/

private $commentaires;



public function __construct(){
$this->commentaires = new ArrayCollection();
$this->datepublication = new Datetime();
}


/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}

/**
* Set prix
*
* @param float $prix
*
* @return Annonce
*/
public function setPrix($prix)
{
$this->prix = $prix;

return $this;
}

/**
* Get prix
*
* @return float
*/
public function getPrix()
{
return $this->prix;
}

/**
* Set datepublication
*
* @param DateTime $datepublication
*
* @return Annonce
*/
public function setDatepublication($datepublication)
{
$this->datepublication = $datepublication;

return $this;
}

/**
* Get datepublication
*
* @return DateTime
*/
public function getDatepublication()
{
return $this->datepublication;
}

/**
* Set auteurId
*
* @param integer $auteurId
*
* @return Annonce
*/
public function setAuteurId($auteurId)
{
$this->auteurId = $auteurId;

return $this;
}

/**
* Get auteurId
*
* @return int
*/
public function getAuteurId()
{
return $this->auteurId;
}

/**
* Set auteurName
*
* @param string $auteurName
*
* @return Annonce
*/
public function setAuteurName($auteurName)
{
$this->auteurName = $auteurName;

return $this;
}

/**
* Get auteurName
*
* @return string
*/
public function getAuteurName()
{
return $this->auteurName;
}

/**
* Set titre
*
* @param string $titre
*
* @return Annonce
*/
public function setTitre($titre)
{
$this->titre = $titre;

return $this;
}

/**
* Get titre
*
* @return string
*/
public function getTitre()
{
return $this->titre;
}


/**
* Set contenu
*
* @param string $contenu
*
* @return Annonce
*/
public function setContenu($contenu)
{
$this->contenu = $contenu;

return $this;
}

/**
* Get contenu
*
* @return string
*/
public function getContenu()
{
return $this->contenu;
}

/**
* Set ville
*
* @param string $ville
*
* @return Annonce
*/
public function setVille($ville)
{
$this->ville = $ville;

return $this;
}

/**
* Get ville
*
* @return string
*/
public function getVille()
{
return $this->ville;
}

/**
* Set categorie
*
* @param string $categorie
*
* @return Annonce
*/
public function setCategorie($categorie)
{
$this->categorie = $categorie;

return $this;
}

/**
* Get categorie
*
* @return string
*/
public function getCategorie()
{
return $this->categorie;
}

/**
* Set nbplace
*
* @param integer $nbplace
*
* @return Annonce
*/
public function setNbplace($nbplace)
{
$this->nbplace = $nbplace;

return $this;
}

/**
* Get nbplace
*
* @return int
*/
public function getNbplace()
{
return $this->nbplace;
}


public function getCommentaires(){
return $this->commentaires;
}

public function addCommentaires(commentaire $commentaire){
$this->commentaires = $commentaire;
}
}


I created the form using the command. I manage to persist a user in the database.










share|improve this question

























  • is the page reloading after a hit on the submit button ? Is your HTML valid ?

    – Frank B
    Mar 11 '18 at 22:37











  • Yes you were right ! Thank you it was just my html that wasnt right.

    – mg175430
    Mar 12 '18 at 9:50











  • Yes you were right ! Thank you it was just my html that wasnt right.

    – mg175430
    Mar 12 '18 at 9:50














0












0








0








I've trouble with form



The form is not being submitted when I submit it. No errors are shown.



I fill the field and yet when I check the profiler in form section it says form was not submit:



Option  Passed Value    Resolved Value
action

"/Symfony/web/app_dev.php/auth/fr/user/add"

same as passed value
data

Annonce {#4948 ▼
-id: null
-prix: null
-datepublication: DateTime @1520793937 {#5015 ▶}
-auteurId: 1
-titre: null
-auteurName: null
-contenu: null
-ville: null
-categorie: null
-nbplace: null
-commentaires: ArrayCollection {#5014 …}
}

same as passed value


here the controller method bind to:



amespace CPCocolocBundleController;
use SymfonyBundleFrameworkBundleControllerController;
use SensioBundleFrameworkExtraBundleConfigurationRoute;
use SymfonyComponentHttpFoundationRequest;
use SymfonyComponentHttpFoundationResponse;
use CPCocolocBundleEntitycommentaire;
use CPCocolocBundleEntityAnnonce;
use CPCocolocBundleFormAnnonceType;
use SymfonyComponentHttpKernelExceptionNotFoundHttpException;
use CPUserBundleEntityUser;
use SensioBundleFrameworkExtraBundleConfigurationSecurity;


/**
*@Route ("/auth/{_locale}")


*/



class AnnonceController extends Controller{


/**
* @Route("/user/add", name="addAnnonce")
* @return SymfonyComponentHttpFoundationResponse
* @throws LogicException
*/

public function newAction (Request $request){

$annonce = new Annonce();

$userId= $this->getUser()->getId();

$form = $this->createForm(AnnonceType::class, $annonce,[
'action'=>$this->generateUrl('addAnnonce')
]);

$annonce->setAuteurId($userId);
$form->handleRequest($request);
if (!$form->isSubmitted() || ! $form->isValid()){

return $this->render('@CPCocoloc/Annonce/new.html.twig',[
'form'=> $form->createView(),
]);
}

$em = $this->getDoctrine()->getManager();
$em->persist($annonce);
$em->flush();

$this->addFlash('notice', 'Annonce postée');

return $this->redirectToRoute('index');

}
}


here is the entity:



use DoctrineORMMapping as ORM;
use DoctrineCommonCollectionsArrayCollection;

/**
* Annonce
*
* @ORMTable(name="annonce")
* @ORMEntity(repositoryClass="CPCocolocBundleRepositoryAnnonceRepository")
*/
class Annonce
{
/**
* @var int
*
* @ORMColumn(name="id", type="integer")
* @ORMId
* @ORMGeneratedValue(strategy="AUTO")
*/
private $id;

/**
* @var float
*
* @ORMColumn(name="prix", type="float")
*/
private $prix;

/**
* @var DateTime
*
* @ORMColumn(name="Datepublication", type="datetime")
*/
private $datepublication;

/**
* @var int
*
* @ORMColumn(name="auteurId", type="integer")
*/
private $auteurId;

/**
* @var string
*
* @ORMColumn(name="titre", type="string", length=255)
*/
private $titre;

/**
* @var string
*
* @ORMColumn(name="auteurName", type="string", length=255)
*/
private $auteurName;

/**
* @var string
*
* @ORMColumn(name="contenu", type="text")
*/
private $contenu;

/**
* @var string
*
* @ORMColumn(name="ville", type="string", length=255)
*/
private $ville;

/**
* @var string
*
* @ORMColumn(name="categorie", type="string", length=255)
*/
private $categorie;

/**
* @var int
*
* @ORMColumn(name="Nbplace", type="integer")
*/
private $nbplace;

/**
*@ORMOneToMany(targetEntity="commentaire", mappedBy="annonce")
*/

private $commentaires;



public function __construct(){
$this->commentaires = new ArrayCollection();
$this->datepublication = new Datetime();
}


/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}

/**
* Set prix
*
* @param float $prix
*
* @return Annonce
*/
public function setPrix($prix)
{
$this->prix = $prix;

return $this;
}

/**
* Get prix
*
* @return float
*/
public function getPrix()
{
return $this->prix;
}

/**
* Set datepublication
*
* @param DateTime $datepublication
*
* @return Annonce
*/
public function setDatepublication($datepublication)
{
$this->datepublication = $datepublication;

return $this;
}

/**
* Get datepublication
*
* @return DateTime
*/
public function getDatepublication()
{
return $this->datepublication;
}

/**
* Set auteurId
*
* @param integer $auteurId
*
* @return Annonce
*/
public function setAuteurId($auteurId)
{
$this->auteurId = $auteurId;

return $this;
}

/**
* Get auteurId
*
* @return int
*/
public function getAuteurId()
{
return $this->auteurId;
}

/**
* Set auteurName
*
* @param string $auteurName
*
* @return Annonce
*/
public function setAuteurName($auteurName)
{
$this->auteurName = $auteurName;

return $this;
}

/**
* Get auteurName
*
* @return string
*/
public function getAuteurName()
{
return $this->auteurName;
}

/**
* Set titre
*
* @param string $titre
*
* @return Annonce
*/
public function setTitre($titre)
{
$this->titre = $titre;

return $this;
}

/**
* Get titre
*
* @return string
*/
public function getTitre()
{
return $this->titre;
}


/**
* Set contenu
*
* @param string $contenu
*
* @return Annonce
*/
public function setContenu($contenu)
{
$this->contenu = $contenu;

return $this;
}

/**
* Get contenu
*
* @return string
*/
public function getContenu()
{
return $this->contenu;
}

/**
* Set ville
*
* @param string $ville
*
* @return Annonce
*/
public function setVille($ville)
{
$this->ville = $ville;

return $this;
}

/**
* Get ville
*
* @return string
*/
public function getVille()
{
return $this->ville;
}

/**
* Set categorie
*
* @param string $categorie
*
* @return Annonce
*/
public function setCategorie($categorie)
{
$this->categorie = $categorie;

return $this;
}

/**
* Get categorie
*
* @return string
*/
public function getCategorie()
{
return $this->categorie;
}

/**
* Set nbplace
*
* @param integer $nbplace
*
* @return Annonce
*/
public function setNbplace($nbplace)
{
$this->nbplace = $nbplace;

return $this;
}

/**
* Get nbplace
*
* @return int
*/
public function getNbplace()
{
return $this->nbplace;
}


public function getCommentaires(){
return $this->commentaires;
}

public function addCommentaires(commentaire $commentaire){
$this->commentaires = $commentaire;
}
}


I created the form using the command. I manage to persist a user in the database.










share|improve this question
















I've trouble with form



The form is not being submitted when I submit it. No errors are shown.



I fill the field and yet when I check the profiler in form section it says form was not submit:



Option  Passed Value    Resolved Value
action

"/Symfony/web/app_dev.php/auth/fr/user/add"

same as passed value
data

Annonce {#4948 ▼
-id: null
-prix: null
-datepublication: DateTime @1520793937 {#5015 ▶}
-auteurId: 1
-titre: null
-auteurName: null
-contenu: null
-ville: null
-categorie: null
-nbplace: null
-commentaires: ArrayCollection {#5014 …}
}

same as passed value


here the controller method bind to:



amespace CPCocolocBundleController;
use SymfonyBundleFrameworkBundleControllerController;
use SensioBundleFrameworkExtraBundleConfigurationRoute;
use SymfonyComponentHttpFoundationRequest;
use SymfonyComponentHttpFoundationResponse;
use CPCocolocBundleEntitycommentaire;
use CPCocolocBundleEntityAnnonce;
use CPCocolocBundleFormAnnonceType;
use SymfonyComponentHttpKernelExceptionNotFoundHttpException;
use CPUserBundleEntityUser;
use SensioBundleFrameworkExtraBundleConfigurationSecurity;


/**
*@Route ("/auth/{_locale}")


*/



class AnnonceController extends Controller{


/**
* @Route("/user/add", name="addAnnonce")
* @return SymfonyComponentHttpFoundationResponse
* @throws LogicException
*/

public function newAction (Request $request){

$annonce = new Annonce();

$userId= $this->getUser()->getId();

$form = $this->createForm(AnnonceType::class, $annonce,[
'action'=>$this->generateUrl('addAnnonce')
]);

$annonce->setAuteurId($userId);
$form->handleRequest($request);
if (!$form->isSubmitted() || ! $form->isValid()){

return $this->render('@CPCocoloc/Annonce/new.html.twig',[
'form'=> $form->createView(),
]);
}

$em = $this->getDoctrine()->getManager();
$em->persist($annonce);
$em->flush();

$this->addFlash('notice', 'Annonce postée');

return $this->redirectToRoute('index');

}
}


here is the entity:



use DoctrineORMMapping as ORM;
use DoctrineCommonCollectionsArrayCollection;

/**
* Annonce
*
* @ORMTable(name="annonce")
* @ORMEntity(repositoryClass="CPCocolocBundleRepositoryAnnonceRepository")
*/
class Annonce
{
/**
* @var int
*
* @ORMColumn(name="id", type="integer")
* @ORMId
* @ORMGeneratedValue(strategy="AUTO")
*/
private $id;

/**
* @var float
*
* @ORMColumn(name="prix", type="float")
*/
private $prix;

/**
* @var DateTime
*
* @ORMColumn(name="Datepublication", type="datetime")
*/
private $datepublication;

/**
* @var int
*
* @ORMColumn(name="auteurId", type="integer")
*/
private $auteurId;

/**
* @var string
*
* @ORMColumn(name="titre", type="string", length=255)
*/
private $titre;

/**
* @var string
*
* @ORMColumn(name="auteurName", type="string", length=255)
*/
private $auteurName;

/**
* @var string
*
* @ORMColumn(name="contenu", type="text")
*/
private $contenu;

/**
* @var string
*
* @ORMColumn(name="ville", type="string", length=255)
*/
private $ville;

/**
* @var string
*
* @ORMColumn(name="categorie", type="string", length=255)
*/
private $categorie;

/**
* @var int
*
* @ORMColumn(name="Nbplace", type="integer")
*/
private $nbplace;

/**
*@ORMOneToMany(targetEntity="commentaire", mappedBy="annonce")
*/

private $commentaires;



public function __construct(){
$this->commentaires = new ArrayCollection();
$this->datepublication = new Datetime();
}


/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}

/**
* Set prix
*
* @param float $prix
*
* @return Annonce
*/
public function setPrix($prix)
{
$this->prix = $prix;

return $this;
}

/**
* Get prix
*
* @return float
*/
public function getPrix()
{
return $this->prix;
}

/**
* Set datepublication
*
* @param DateTime $datepublication
*
* @return Annonce
*/
public function setDatepublication($datepublication)
{
$this->datepublication = $datepublication;

return $this;
}

/**
* Get datepublication
*
* @return DateTime
*/
public function getDatepublication()
{
return $this->datepublication;
}

/**
* Set auteurId
*
* @param integer $auteurId
*
* @return Annonce
*/
public function setAuteurId($auteurId)
{
$this->auteurId = $auteurId;

return $this;
}

/**
* Get auteurId
*
* @return int
*/
public function getAuteurId()
{
return $this->auteurId;
}

/**
* Set auteurName
*
* @param string $auteurName
*
* @return Annonce
*/
public function setAuteurName($auteurName)
{
$this->auteurName = $auteurName;

return $this;
}

/**
* Get auteurName
*
* @return string
*/
public function getAuteurName()
{
return $this->auteurName;
}

/**
* Set titre
*
* @param string $titre
*
* @return Annonce
*/
public function setTitre($titre)
{
$this->titre = $titre;

return $this;
}

/**
* Get titre
*
* @return string
*/
public function getTitre()
{
return $this->titre;
}


/**
* Set contenu
*
* @param string $contenu
*
* @return Annonce
*/
public function setContenu($contenu)
{
$this->contenu = $contenu;

return $this;
}

/**
* Get contenu
*
* @return string
*/
public function getContenu()
{
return $this->contenu;
}

/**
* Set ville
*
* @param string $ville
*
* @return Annonce
*/
public function setVille($ville)
{
$this->ville = $ville;

return $this;
}

/**
* Get ville
*
* @return string
*/
public function getVille()
{
return $this->ville;
}

/**
* Set categorie
*
* @param string $categorie
*
* @return Annonce
*/
public function setCategorie($categorie)
{
$this->categorie = $categorie;

return $this;
}

/**
* Get categorie
*
* @return string
*/
public function getCategorie()
{
return $this->categorie;
}

/**
* Set nbplace
*
* @param integer $nbplace
*
* @return Annonce
*/
public function setNbplace($nbplace)
{
$this->nbplace = $nbplace;

return $this;
}

/**
* Get nbplace
*
* @return int
*/
public function getNbplace()
{
return $this->nbplace;
}


public function getCommentaires(){
return $this->commentaires;
}

public function addCommentaires(commentaire $commentaire){
$this->commentaires = $commentaire;
}
}


I created the form using the command. I manage to persist a user in the database.







symfony






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 2:22









Cœur

17.7k9106145




17.7k9106145










asked Mar 11 '18 at 19:10









mg175430mg175430

85




85













  • is the page reloading after a hit on the submit button ? Is your HTML valid ?

    – Frank B
    Mar 11 '18 at 22:37











  • Yes you were right ! Thank you it was just my html that wasnt right.

    – mg175430
    Mar 12 '18 at 9:50











  • Yes you were right ! Thank you it was just my html that wasnt right.

    – mg175430
    Mar 12 '18 at 9:50



















  • is the page reloading after a hit on the submit button ? Is your HTML valid ?

    – Frank B
    Mar 11 '18 at 22:37











  • Yes you were right ! Thank you it was just my html that wasnt right.

    – mg175430
    Mar 12 '18 at 9:50











  • Yes you were right ! Thank you it was just my html that wasnt right.

    – mg175430
    Mar 12 '18 at 9:50

















is the page reloading after a hit on the submit button ? Is your HTML valid ?

– Frank B
Mar 11 '18 at 22:37





is the page reloading after a hit on the submit button ? Is your HTML valid ?

– Frank B
Mar 11 '18 at 22:37













Yes you were right ! Thank you it was just my html that wasnt right.

– mg175430
Mar 12 '18 at 9:50





Yes you were right ! Thank you it was just my html that wasnt right.

– mg175430
Mar 12 '18 at 9:50













Yes you were right ! Thank you it was just my html that wasnt right.

– mg175430
Mar 12 '18 at 9:50





Yes you were right ! Thank you it was just my html that wasnt right.

– mg175430
Mar 12 '18 at 9:50












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49223973%2fform-is-not-submitted-no-errors-are-shown%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49223973%2fform-is-not-submitted-no-errors-are-shown%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Coverage of Google Street View

Full-time equivalent

Surfing