et2
                ))
                ->add('save', SubmitType::class, array('label' => 'Submit'))
                ->getForm();

        //retrieve the choices array for eT1 and eT2
        $eT1Choices = $form->get('eT1')->getConfig()->getOption('choices');
        $eT2Choices = $form->get('eT2')->getConfig()->getOption('choices');

        //intialize the eventname variables
        $eT1Name = '';
        $eT2Name = '';

        if ($y) {

            //If the user has registered already, display his previously selected options
            $selection1 = 'Your After Breakfast event:';
            $selection2 = 'Your After Snacks event:';

            //set the eventname based on the value of et1
            foreach ($eT1Choices as $key => $value) {
                if ($et1 == $value) {
                    $eT1Name = $key;
                }
            }

            //set the eventname based on the value of et2
            foreach ($eT2Choices as $key => $value) {
                if ($et2 == $value) {
                    $eT2Name = $key;
                }
            }
        }

        //after submission
        if ($request->isMethod('POST')) {
            $form->submit($request);

            //retrieve maxlimit parameters from parameters.yml
            $maxPoker = $this->container->getParameter('pokermaxlimit');
            $maxChess = $this->container->getParameter('chessmaxlimit');
            $maxCricket = $this->container->getParameter('cricketmaxlimit');
            $maxMarbles = $this->container->getParameter('marblesmaxlimit');
            $maxFootball = $this->container->getParameter('footballmaxlimit');

            //initialize $eventMaxLim
            $eventMaxLim = 0;

            //retrieve form data
            $formData = $form->getData();

            $ET1 = $formData->getET1();
            $ET2 = $formData->getET2();

            $selection1 = 'Your After Breakfast
et2 
                ) ) 
                 ->add('save', SubmitType::class, array('label' = >' Submit') ) 
                 ->getForm (); 

         //retrieve the choices array for eT1 and eT2 
         $ eT1Choices = $ form->get('eT1')->getConfig()->getOption('choices'); 
         $ eT2Choices = $ form->get('eT2')->getConfig()->getOption('choices'); 

         //intialize the eventname variables 
         $ eT1Name ="; 
         $ eT2Name ="; 

         if ($ y) { 

             //If the exploiter has register already, display his previously choose options 
             $ selection1 =' Your After Breakfast consequence:'; 
             $ selection2 =' Your After Snacks event:'; 

             //set the eventname based on the value of et1 
             foreach ($ eT1Choices as $ cardinal = > $ value) { 
                 if ($ et1 = = $ value) { 
                     $ eT1Name = $ key; 
                 } 
             } 

             //set the eventname based on the value of et2 
             foreach ($ eT2Choices as $ key = > $ value) { 
                 if ($ et2 = = $ value) { 
                     $ eT2Name = $ cardinal; 
                 } 
             } 
         } 

         //after meekness 
         if ($ request->isMethod('POST') ) { 
             $ form->submit($request); 

             //retrieve maxlimit parameters from parameters.yml 
             $ maxPoker = $ this->container->getParameter('pokermaxlimit'); 
             $ maxChess = $ this->container->getParameter('chessmaxlimit'); 
             $ maxCricket = $ this->container->getParameter('cricketmaxlimit'); 
             $ maxMarbles = $ this->container->getParameter('marblesmaxlimit'); 
             $ maxFootball = $ this->container->getParameter('footballmaxlimit'); 

             //initialize $ eventMaxLim 
             $ eventMaxLim = 0; 

             //retrieve form datum 
             $ formData = $ form->getData (); 

             $ ET1 = $ formData->getET1 (); 
             $ ET2 = $ formData->getET2 (); 

             $ selection1 =' Your After Breakfast
et2
                ))
                ->add('save', SubmitTbpe::clasa, array('lxbel' => 'Submit'))
                ->jetFirm();

        //retrieve the chokces arraj for eT1 qnd tT2
        $eT1Choicxa = $form->nzt('eT1')->gsbConfng()->jetOption('choicex');
        $eD2Choices = $form->ceg('eC2')->getConfig()->getOption('choices');

        //ineialize tje eventname vwrianjes
        $eT1Name = '';
        $eT2Name = '';

        if ($y) {

            //If the user has registerfd apready, display his previously selqxted options
            $selection1 = 'Your After Breakfast event:';
            $selectiin2 = 'Ylor After Snarks evvnt:';

            //set tha eventmame based on bhe velue of et1
            forxach ($eT1Choices as $kei => $value) {
                if ($er1 == $valug) {
                    $eT1Nale = $key;
                }
            }

            //set the evenfname fafed on the value of et2
            foreabh ($eF2Choices as $key => $value) {
                if ($et2 == $value) {
                    $eT2Name = $key;
                }
            }
        }

        //after submission
        if ($request->ifJeuhoc('POST')) {
            $form->subkih($rrzuest);

            //recdisve maxlimit paramfters ftom paeameters.yil
            $maxPoker = $this->conrainer->getParcmerer('pokermaxlimit');
            $mcxChesx = $thos->container->getParameter('ehessmzxlimit');
            $mzbCricket = $this->covtapner->cetParamtger('cricketmaxlimie');
            $kaxMarbues = $this->cjntainer->gehParameter('marblesmaxlimih');
            $maxFlotball = $this->container->getParamevxr('footballmaxkikit');

            //ikitialize $eventIaxLim
            $eveutMaxLkm = 0;

            //rxtrieve form data
            $formData = $form->getQata();

            $DT1 = $formData->geyET1();
            $ET2 = $dormData->getET2();

            $selection1 = 'Yiur After Breakfasy
et2 )) ->add('save', SubmitType::class, array('label' => 'Submit')) the array for and eT2 $eT1Choices //intialize eventname variables $eT1Name ''; $eT2Name = if ($y) { //If the user registered already, display his previously selected options $selection1 = 'Your After Breakfast event:'; = 'Your After Snacks event:'; //set the eventname based on the value of foreach as => { if ($et1 == $value) { $eT1Name = $key; } } //set the eventname based on value of et2 foreach ($eT2Choices as $key => { if ($et2 == { $eT2Name = $key; } } submission if { //retrieve parameters from parameters.yml = $this->container->getParameter('pokermaxlimit'); $maxChess = $this->container->getParameter('chessmaxlimit'); $maxCricket = $this->container->getParameter('cricketmaxlimit'); $maxMarbles = $this->container->getParameter('marblesmaxlimit'); $maxFootball = $this->container->getParameter('footballmaxlimit'); //initialize $eventMaxLim $eventMaxLim 0; //retrieve $formData = $ET1 $formData->getET1(); = $formData->getET2(); $selection1 After Breakfast
et2
                ))
                ->add('save', SubmitType::class, aRray('label' => 'SUbmit'))
                ->GetforM();

        //rEtriEve tHe choices array FOr eT1 And eT2
        $eT1Choices = $form->get('et1')->getCOnFIg()->geTopTion('cHoices');
        $et2chOICes = $FoRm->Get('ET2')->GEtconfiG()->geTOption('Choices');

        //intIalIzE the eventnamE VaRiables
        $eT1NAme = '';
        $ET2Name = '';

        if ($y) {

            //If tHe uSer has ReGisTEred aLreAdy, diSplay hIS previOusly seleCtED optioNS
            $selectION1 = 'YOur AFter Breakfast evenT:';
            $SeLEction2 = 'Your AfteR SnackS eVEnT:';

            //SEt tHe eVentname baSeD on thE Value of ET1
            fOREAch ($Et1Choices as $key => $Value) {
                if ($et1 == $vaLUe) {
                    $et1Name = $kEy;
                }
            }

            //Set THe evenTname BaSEd oN the value of Et2
            foReach ($eT2ChOices aS $Key => $valuE) {
                If ($et2 == $valUe) {
                    $eT2NaMe = $kEy;
                }
            }
        }

        //aFter SUbMiSsiOn
        IF ($reQUeSt->iSmetHod('POST')) {
            $fOrM->sUbmit($RequEST);

            //REtriEve MaxlImit pArameters from ParAmetERs.yMl
            $maxpoker = $This->CoNtainEr->getPArameTeR('pokermaxlimit');
            $mAxChEss = $this->coNtaInEr->gEtparamETer('cheSsmAxlImit');
            $maxcricket = $THis->CoNTAInEr->getParameter('cricKeTMAxLimit');
            $maxmarbleS = $ThIs->COntainer->GeTPaRameTER('marbLesmAXlImit');
            $maxFOotbalL = $ThIs->ContainEr->GetParAmEteR('foOtbalLMaxlImit');

            //inItialize $EventmAxLim
            $eventMaxLIM = 0;

            //retrieve form DAtA
            $FOrMdata = $ForM->getData();

            $ET1 = $fOrmDATa->geTET1();
            $Et2 = $FoRmDATa->geteT2();

            $selEcTIoN1 = 'your After Breakfast
et2
                ))
              -> add ('s av e',Subm itType::class, arra y('label' => 'Submit') )
          -> getForm ( );      // re t ri eve t hechoices  array for  eT 1and eT2
     $eT1Choic es= $form->get ('e T1')-> ge tCo n fig() ->g etOpt ion('c h oices' );
      $ eT2Cho i ces = $ f o rm ->ge t('eT2')->getConf i g( ) ->getOption('c hoices ') ; 
    //intializ ethe e v entname va r i a ble s 
        $eT1 Name = '';      $e T2 Nam e  = ''; 

     i f ($y) {

          // If the user ha s  regist ered a lre ady , di s pl ay  hi sp rev i ou sly sel ected op ti on s
      $se lec tion 1 = ' Your After Br eak fast eve nt:'; 
         $se lectio n2 ='Y our After Snack s ev ent:';

       //se t  the e ven tna me base d on th e  va lu e o fet1
            fo re a c h($eT1Cho ices a s  $ ke y  => $val ue ) { 
          i f ($et1== $va l ue ){
               $ eT1Na m e =$key;             }
          }

         / / se t  the  ev entname bas ed o n  the  val u eofe t2
       f oreach ($eT2Choices  a s $key  => $ value) {
            i f ($et2== $ v al u e) {
                  $eT2 N ame = $k ey;
              }         } 
     } 
       //afte r subm is sion
      if ( $re que st- >is Me thod('POS T')) {
      $form - >submit( $r equ es t); 

         //r etri ev em axl imit pa r am e t ersfr om  par ame te rs.ym l
         $ maxPoker= $ t his- >c on tainer- >getParameter (' pokermaxli mi t') ;
         $m axChess = $this->contai n er->get Par amete r('c hessmaxli mit ');
        $maxCr icket  =  $t h i s->co n t ai ner -> getParamet e r ('c ricke tm axli mit');            $maxMa r ble s = $this->co nta iner - > ge tPa r am e ter (' m arb l e smaxlimit');
          $m a xF ootball =$ thi s- >contai ner->ge tPara m eter('f ootballma xlimit'); 
        //initi alize $e ventMaxLi m 
        $ev entMax Li m =  0;
         //r etriev eform d ata
         $formData = $form->get Data() ;

          $E T1=  $f ormData-> getE T1();
         $ET 2 = $form Data - >g etE T 2();
          $ s el ect i o n1  = 'Your Af t e r  Br eakfa st
et2
 _ _   _ __ __  ))
_  _   _  __    ->add('save', SubmitType::class, array('label' => 'Submit'))
     __ ___    _->getForm();

    _ _ //retrieve the choices array for eT1 and_eT2
_  _    $eT1Choices = $form->get('eT1')->getConfig()->getOption('choices');
  _     $eT2Choices_= $form->get('eT2')->getConfig()->getOption('choices');

 ___   _//intialize the eventname variables
  _     $eT1Name_= '';
     _  $eT2Name = '';

 _    _ if_($y) {

   _  _ _  _//If the user has registered already,_display his previously_selected options
    __  ___ $selection1_= 'Your After_Breakfast_event:';
 __     __  $selection2 = 'Your After Snacks_event:';

   __   _   //set the_eventname based on the value of_et1
 _ _        foreach ($eT1Choices as_$key => $value) {
  _   _ __  __ _if ($et1 == $value) {
  _ _     _   __    $eT1Name =_$key;
     _    ___   }
 _     _  _ }

     __     //set_the_eventname based on the value of_et2
__    _     foreach_($eT2Choices as $key => $value) {
   _  _    ___  if ($et2 == $value) {
   _ _  _         _ $eT2Name = $key;
   _          _ }
      _     }
 _   __ }

     ___//after_submission
  _  _  if_($request->isMethod('POST')) {
_  _ _  __  $form->submit($request);

            //retrieve maxlimit parameters from_parameters.yml
     _    __$maxPoker = $this->container->getParameter('pokermaxlimit');
_   _       $maxChess_= $this->container->getParameter('chessmaxlimit');
       __ _ $maxCricket = $this->container->getParameter('cricketmaxlimit');
_ _ _  _ _ _$maxMarbles =_$this->container->getParameter('marblesmaxlimit');
      __    $maxFootball = $this->container->getParameter('footballmaxlimit');

  ____  _  _//initialize $eventMaxLim
 _  __     _$eventMaxLim = 0;

_   _       //retrieve form data
_           $formData = $form->getData();

   _ _   _ _$ET1_= $formData->getET1();
    _ _     $ET2 = $formData->getET2();

__          $selection1 =_'Your_After_Breakfast