Anmeldung Lehrerfortbildung

setFallbackLocales(array('de')); $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); $translator->addResource('yaml', '/cms/sw/php/include/form/symfony/Translations/form.de.yaml', 'de'); $translator->addResource('yaml', '/cms/sw/php/include/form/symfony/Translations/form.en.yaml', 'en'); $twig->addExtension(new \Symfony\Bridge\Twig\Extension\TranslationExtension($translator)); $twigTemplateVariables['translation'] = true; // Form Engine $formEngine = new Symfony\Bridge\Twig\Form\TwigRendererEngine(array('bootstrap_4_layout.html.twig', 'fields.html.twig'), $twig); // Twig Renderer $twig->addRuntimeLoader(new Twig\RuntimeLoader\FactoryRuntimeLoader(array( Symfony\Component\Form\FormRenderer::class => function () use ($formEngine, $csrfManager) { return new Symfony\Component\Form\FormRenderer($formEngine, $csrfManager); }, ))); $twig->addExtension(new Symfony\Bridge\Twig\Extension\FormExtension()); //$twig->addExtension(new \Twig_Extension_Debug()); // Form $formFactory = Symfony\Component\Form\Forms::createFormFactoryBuilder() ->addExtension(new Symfony\Component\Form\Extension\Csrf\CsrfExtension($csrfManager)) ->addExtension(new Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationExtension()) ->addExtension(new Symfony\Component\Form\Extension\Validator\ValidatorExtension(Symfony\Component\Validator\Validation::createValidator())) ->getFormFactory(); $formBuilder = $formFactory->createBuilder(Symfony\Component\Form\Extension\Core\Type\FormType::class, null, [ 'compound' => true, 'csrf_protection' => true ]); if ('' == 'custom') { $formBuilder->setAction('/biologiedidaktik/anmeldung_fortbildungen_bewertung_apfel.php'); } else { $formBuilder->setAction('#form_2_1'); } $formBuilder->setMethod('POST'); $formBuilder->setAttribute('novalidate', 'novalidate'); $twigTemplateVariables['id'] = ''; $twigTemplateVariables['legend'] = html_entity_decode('Von der Chemotherapie zur zielgerichteten Krebstherapie',ENT_QUOTES); $twigTemplateVariables['nextUrl'] = 'https://www.uni-due.de/biologiedidaktik/fortbildungsveranstaltungen.php'; $twigTemplateVariables['anchor'] = 'form_2_1'; $fieldset = $formFactory->createNamedBuilder('fieldset_2_1', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array( 'label' => html_entity_decode('Von der Chemotherapie zur zielgerichteten Krebstherapie',ENT_QUOTES) ) ); $mail = array( 'from' => 'biofortbildung@uni-due.de', 'to' => array( 'compact' => array('biofortbildung@uni-due.de'), 'complete' => array() ), 'subject' => html_entity_decode('Fortbildungsveranstaltung: Von der Chemotherapie zur zielgerichteten Krebstherapie',ENT_QUOTES), 'text' => html_entity_decode('<p>Vielen Dank!<br /> <br /> Sie haben sich soeben verbindlich f&uuml;r die Fortbildung &quot;Von der Chemotherapie zur zielgerichteten Krebstherapie&quot; am 09.05.2019&nbsp; von 14:30 - 17:30 Uhr angemeldet.<br /> <br /> Bitte &uuml;berweisen Sie den Teilnehmerbeitrag von 39 &euro; auf folgendes Konto:<br /> <br /> Empf&auml;nger: Universit&auml;t Duisburg-Essen<br /> Bank:&nbsp;Sparkasse Essen<br /> KTO: 248997<br /> BLZ: 360 501 05<br /> IBAN: DE75 3605 0105 0000 2489 97<br /> BIC: SPESDE3EXXX<br /> Verwendungszweck (unbedingt angeben!): 40901030150003/Nachname des Teilnehmers</p> <p>Der Teilnehmerbeitrag wird innerhalb von 14 Tagen nach Anmeldung f&auml;llig.<br /> <br /> Nach Zahlungseingang erhalten Sie von uns eine Zahlungsbest&auml;tigung f&uuml;r Ihre Unterlagen und weitere Informationen zur Fortbildung per E-Mail.<br /> <br /> Mit freundlichen Gr&uuml;&szlig;en<br /> Ihr Biodidaktik Team</p> <p>&nbsp;</p> <p>Ihre &uuml;bermittelten Informationen:</p> ',ENT_QUOTES), 'confirmation' => '1' ? true : false, 'confirmationReceiver' => '', 'attachPdf' => '' ? true : false ); $db = false; $successMessage = '<p>Ihre Daten wurden erfolgreich &uuml;bermittelt.</p> <p>In K&uuml;rze werden Sie eine automatische Best&auml;tigungs-E-Mail erhalten. Diese enth&auml;lt au&szlig;erdem Zahlungsinformationen f&uuml;r die &Uuml;berweisung des Teilnehmerbeitrages.</p> <p>Der Teilnehmerbeitrag wird innerhalb von 14 Tagen nach Anmeldung f&auml;llig.</p> <p>Vielen Dank!</p> <p>&nbsp;</p> '; $twigTemplateVariables['locale'] = $locale; static $udeFormDraftScriptIncluded = false; if (!$udeFormDraftScriptIncluded) { $udeFormDraftScriptIncluded = true; $formDraftJsPath = '/cms/sw/php/include/form/form-draft.js'; if (is_readable($formDraftJsPath)) { echo ''; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_3', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_3', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_3', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_3', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_3', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('Anrede',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('Anrede',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $choices[html_entity_decode('Herr',ENT_QUOTES)] = html_entity_decode('Herr',ENT_QUOTES); $choices[html_entity_decode('Frau',ENT_QUOTES)] = html_entity_decode('Frau',ENT_QUOTES); $options = array( 'choices' => $choices, 'label' => html_entity_decode('Anrede',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName('Anrede'); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName(''); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_4', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_4', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_4', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_4', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_4', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName('Vorname'); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $options = array( 'label' => html_entity_decode('Vorname',ENT_QUOTES), 'required' => '1' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName('Vorname'); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_5', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_5', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_5', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_5', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_5', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName('Name'); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $options = array( 'label' => html_entity_decode('Name',ENT_QUOTES), 'required' => '1' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName('Name'); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_6', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_6', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_6', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_6', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => 'email' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_6', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName('E-Mailadresse'); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $type = Symfony\Component\Form\Extension\Core\Type\EmailType::class; $constraints[] = new Symfony\Component\Validator\Constraints\Email(array( 'message' => 'Dieses Feld darf nur eine E-Mail-Adresse enthalten.' )); if ('1') { $constraints[] = new Symfony\Component\Validator\Constraints\NotBlank(array( 'message' => 'Dieses Feld muss einen Wert enthalten.' )); } $options = array( 'label' => html_entity_decode('E-Mailadresse',ENT_QUOTES), 'required' => '1' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName('E-Mailadresse'); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_7', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_7', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_7', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_7', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_7', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName('Schule_Institution'); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $options = array( 'label' => html_entity_decode('Schule / Institution',ENT_QUOTES), 'required' => '1' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName('Schule_Institution'); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_8', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_8', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_8', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_8', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_8', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('Schulform',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('Schulform',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $choices[html_entity_decode('-bitte auswählen-',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Gymnasium',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Gesamtschule',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Realschule',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Hauptschule',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Sekundarschule',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Grundschule',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Berufskolleg',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Weiterbildungskolleg',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Förderschule',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $choices[html_entity_decode('Sonstiges',ENT_QUOTES)] = html_entity_decode('',ENT_QUOTES); $options = array( 'choices' => $choices, 'label' => html_entity_decode('Schulform',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName('Schulform'); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName(''); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_9', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_9', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_9', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_9', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_9', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName('Ort'); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $options = array( 'label' => html_entity_decode('Ort',ENT_QUOTES), 'required' => '1' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName('Ort'); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_10', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_10', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('

Hiermit melde ich mich für die oben genannte Fortbildung an.

',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_10', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_10', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_10', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName(''); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); $db['fields'][$name] = 'Teilnehmerbeitrag'; break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_11', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_11', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_11', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_11', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_11', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName(''); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $checkboxLabel[$name], //'required' => $checkboxRequired[$name], // Not working for checkboxes? Use choice_attr instead. //'data' => $checkboxValue[$name], 'constraints' => $constraints, 'multiple' => true, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); $db['fields'][$name] = 'Teilnahmebedingungen'; break; case 'date': $options = array( 'label' => html_entity_decode(''), 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); switch ('') { case 'time': $formType = Symfony\Component\Form\Extension\Core\Type\TimeType::class; $format = date('H:i'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; case 'dateTime': $formType = Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; $format = date('Y-m-d" \u\n\d "H:i'); $options['date_widget'] = 'single_text'; $options['time_widget'] = 'single_text'; $options['input'] = 'datetime'; break; default: $formType = Symfony\Component\Form\Extension\Core\Type\DateType::class; $format = date('Y-m-d'); $options['widget'] = 'single_text'; $options['input'] = 'datetime'; break; } $fieldset->add( $name, $formType, $options ); $options = array( 'code' => html_entity_decode('
Format: "' . $format . '" (oder Datepicker des Browsers nutzen)
') ); $fieldset->add( 'kommentar_2_12', CodeType::class, $options ); break; case 'fieldset': $formBuilder->add($fieldset); $disableCsrfProtection = true; $fieldset = $formFactory->createNamedBuilder('fieldset_2_12', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => html_entity_decode('',ENT_QUOTES))); break; case 'file': $options = array( 'label' => html_entity_decode(''), 'multiple' => '' ? true : false, 'required' => '' ? true : false, 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\FileType::class, $options ); break; case 'hidden': $options = array( 'label' => html_entity_decode(''), 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\HiddenType::class, $options ); break; case 'kommentar': $options = array( 'code' => html_entity_decode('',ENT_QUOTES) ); $fieldset->add( 'kommentar_2_12', CodeType::class, $options ); break; case 'leerzeile': $options = array( 'code' => '
' ); $fieldset->add( 'leerzeile_2_12', CodeType::class, $options ); break; case 'password': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\PasswordType::class, $options ); break; case 'radio': // $options = array( // 'label' => html_entity_decode('',ENT_QUOTES), // 'required' => '' ? true : false, // 'value' => html_entity_decode('',ENT_QUOTES), // 'constraints' => $constraints // ); $name = generateValidFormFieldName(''); $radioLabel[$name] = isset($radioLabel[$name]) ? $radioLabel[$name] : html_entity_decode(''); $radioRequired[$name] = '' ? true : (isset($radioRequired[$name]) ? ($radioRequired[$name] == true ? true : false) : false); $radioValue[$name] = '' ? '' : null; // $fieldset->add( // $name, // Symfony\Component\Form\Extension\Core\Type\RadioType::class, // $options // ); $choices[$name][''] = ''; $choicesAttr[$name][''] = array(); //echo '
';
                //var_dump($radioRequired[$name]);
                //echo '
'; $options = array( 'choices' => $choices[$name], 'choice_attr' => $choicesAttr[$name], 'label' => $radioLabel[$name], 'required' => $radioRequired[$name], 'data' => $radioValue[$name], 'constraints' => $constraints, 'multiple' => false, 'expanded' => true, 'placeholder' => false ); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'rawcode': $options = array( 'code' => html_entity_decode('') ); $fieldset->add( 'rawcode_2_12', CodeType::class, $options ); break; case 'reset': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ResetType::class, $options ); break; case 'select': $name = generateValidFormFieldName(html_entity_decode('',ENT_QUOTES)); $selectName = $name; $selectLabel = html_entity_decode('',ENT_QUOTES); $selectRequired = '' ? true : false; $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = ''; break; case 'select-iblock': $selectMultiple = '' ? true : false; $selectExpanded = '' ? true : false; $choices = array(); $value = $selectMultiple ? array() : ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => $value, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'select-option': $choices[''] = ''; $options = array( 'choices' => $choices, 'label' => html_entity_decode($selectLabel,ENT_QUOTES), 'required' => $selectRequired, 'constraints' => $constraints, 'multiple' => $selectMultiple, 'expanded' => $selectExpanded ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\ChoiceType::class, $options ); break; case 'submit': $options = array( 'label' => '' ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\SubmitType::class, $options ); break; case 'text': $type = Symfony\Component\Form\Extension\Core\Type\TextType::class; $pattern = false; $html5Pattern = false; $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); if ($html5Pattern) { $options['attr']['pattern'] = $html5Pattern; } $name = generateValidFormFieldName(''); $fieldset->add( $name, $type, $options ); break; case 'textarea': $options = array( 'label' => html_entity_decode('',ENT_QUOTES), 'required' => '' ? true : false, 'data' => '', 'constraints' => $constraints ); $name = generateValidFormFieldName(''); $fieldset->add( $name, Symfony\Component\Form\Extension\Core\Type\TextareaType::class, $options ); break; } } ?> add($fieldset); // // DSGVO // // $fieldset = $formFactory->createNamedBuilder('dsgvo_2_13', Symfony\Component\Form\Extension\Core\Type\FormType::class, null, array('label' => 'DSGVO')); // // $fieldset->add( // 'dsgvo_checkbox_2_13', // Symfony\Component\Form\Extension\Core\Type\CheckboxType::class, // array( // 'label' => 'DSGVO', // 'required' => true // ) // ); // // $formBuilder->add($fieldset); /** * Captcha */ require_once '/cms/sw/php/include/form/captcha/captcha.php'; $formBuilder->add( 'submit_2_13', Symfony\Component\Form\Extension\Core\Type\SubmitType::class, array( 'label' => 'Abschicken', 'attr' => ['class' => 'btn btn-primary'] ) ); if (isset($disableCsrfProtection) && $disableCsrfProtection) { // Disable CSRF protection. } $form = $formBuilder->getForm(); $request = Symfony\Component\HttpFoundation\Request::createFromGlobals(); $form->handleRequest($request); $template = $twig->load('form.html.twig'); $sessionExpired = false; if ($form->isSubmitted()) { $captcha = $form->get('captcha_' . $formFlex['index'] . '_' . $formFlex['id'])->get('captcha_input_' . $formFlex['index'] . '_' . $formFlex['id']); if (trim((string) $captcha->getData()) != trim((string) $_SESSION['captcha_' . $formFlex['index'] . '_' . $formFlex['id']])) { $captcha->addError(new Symfony\Component\Form\FormError('Captcha falsch!')); } } if ($form->isSubmitted() && !$form->isValid()) { foreach ($form->getErrors(true) as $error) { $cause = $error->getCause(); if ($cause instanceof Symfony\Component\Security\Csrf\Exception\InvalidCsrfTokenException) { $sessionExpired = true; break; } } } $twigTemplateVariables['sessionExpired'] = $sessionExpired; if (!$form->isSubmitted() || ($form->isSubmitted() && !$form->isValid())) { $_SESSION['captcha_enabled'] = true; $_SESSION['captcha_' . $formFlex['index'] . '_' . $formFlex['id']] = $builder->getPhrase(); } if (!$form->isSubmitted() || ($form->isSubmitted() && !$form->isValid())) { $formView = $form->createView(); $twigTemplateVariables['form'] = $formView; $twigTemplateVariables['isContentOld'] = true; echo $template->renderBlock('form', $twigTemplateVariables); } else if ($form->isSubmitted()) { //$errors = $form->getErrors(); if ($form->isValid()) { require_once '/cms/sw/php/include/form/captcha/captcha-lib.php'; ude_captcha_unset_from_session('captcha_' . $formFlex['index'] . '_' . $formFlex['id']); /** * Replace placeholders in string * Schema: {input_name} */ if (!function_exists('replacePlaceholders')) { /** * @param string $string * @param array $fields * @return string */ function replacePlaceholders($string, $fields) { if (preg_match_all('/{{.*?}}/', $string, $placeholders)) { foreach ($placeholders[0] as $placeholder) { $placeholderWithoutBraces = str_replace(array('{{', '}}'), '', $placeholder); if (isset($fields[$placeholderWithoutBraces])) { $string = str_replace($placeholder, $fields[$placeholderWithoutBraces]['value'], $string); } else { $string = str_replace($placeholder, '', $string); } } } return $string; } } $fields = array(); foreach ($form->getData() as $dataKey => $dataValue) { try { if ($form->get($dataKey) instanceof Symfony\Component\Form\Form) { foreach ($form->get($dataKey)->all() as $field) { //echo '
';
                            //var_dump($field->getConfig()->getType()->getInnerType());
                            //echo '
'; if ( $field->getName() != 'captcha_image_2_13' && $field->getName() != 'captcha_input_2_13' && $field->getName() != 'captcha_information_2_13' && $field->getName() != 'captcha_help_2_13' && substr($field->getName(), 0, 8) != 'fieldset' && substr($field->getName(), 0, 10) != 'kommentar_' && substr($field->getName(), 0, 9) != 'leerzeile' && get_class($field->getConfig()->getType()->getInnerType()) != 'Symfony\Component\Form\Extension\Core\Type\ResetType' ) { $name = $field->getName(); $value = $field->getData(); if (get_class($field->getConfig()->getType()->getInnerType()) == 'Symfony\Component\Form\Extension\Core\Type\CheckboxType' && $value == true) { $value = $field->getConfig()->getOption('value'); } if (get_class($field->getConfig()->getType()->getInnerType()) == 'Symfony\Component\Form\Extension\Core\Type\ChoiceType') { if ($field->getConfig()->getOption('multiple') && $field->getConfig()->getOption('expanded')) { if (is_array($value)) { if (count($value) == 0) { $value = ''; } elseif (count($value) == 1) { $value = $value[0]; } } } } if (get_class($field->getConfig()->getType()->getInnerType()) == 'Symfony\Component\Form\Extension\Core\Type\DateType') { //$value = $value->format('Y-m-d'); $format = 'd.m.Y'; } if (get_class($field->getConfig()->getType()->getInnerType()) == 'Symfony\Component\Form\Extension\Core\Type\TimeType') { //$value = $value->format('H:i'); $format = 'H:i'; } if (get_class($field->getConfig()->getType()->getInnerType()) == 'Symfony\Component\Form\Extension\Core\Type\DateTimeType') { //$value = $value->format('Y-m-d H:i'); $format = 'd.m.Y H:i'; } $label = $field->getConfig()->getOption('label'); if (is_array($value)) { $values = array(); foreach ($field->getData() as $value) { if ($value instanceof Symfony\Component\HttpFoundation\File\UploadedFile) { $files[] = $value; $values[] = $value->getClientOriginalName(); } else { $choices = array_flip($field->getConfig()->getOption('choices')); $values[] = $choices[$value]; //$values[] = $choices[$value] . ' ("' . $value . '")'; } } $value = $values; } if ($value instanceof Symfony\Component\HttpFoundation\File\UploadedFile) { $files[] = $value; $value = $value->getClientOriginalName(); } $fields[$name] = array( 'name' => $name, 'value' => $value, 'label' => $label, 'format' => isset($format) ? $format : '' ); if (is_array($mail) && $mail['confirmation'] == true && filter_var($value, FILTER_VALIDATE_EMAIL)) { switch ($mail['confirmationReceiver']) { case 'all': array_push($mail['to']['complete'], $value); break; case 'email': if ($name == 'email') { array_push($mail['to']['complete'], $value); } break; } } } } } } catch (Exception $exception) { } } if ($twigTemplateVariables['isContentOld'] == false) { echo '
'; } require_once '/cms/sw/php/include/form/form-draft-clear.php'; udeFormDraftClearScript(); $successMessage = replacePlaceholders($successMessage, $fields); $twigTemplateVariables['successMessage'] = html_entity_decode($successMessage); echo $template->renderBlock('successMessage', $twigTemplateVariables); if ($mail) { $mail['subject'] = replacePlaceholders($mail['subject'], $fields); $mail['text'] = replacePlaceholders($mail['text'], $fields); if (!empty($mail['attachPdf'])) { $mail['message']['pdfHtml'] = $template->renderBlock('pdfDocument', array( 'fields' => $fields, 'pdfTitle' => html_entity_decode('', ENT_QUOTES), )); $mail['message']['compact'] = $template->renderBlock('mailMessage', array('text' => false, 'fields' => array())); $mail['message']['complete'] = $template->renderBlock('mailMessage', array('text' => html_entity_decode($mail['text']), 'fields' => array())); } else { $mail['message']['compact'] = $template->renderBlock('mailMessage', array('text' => false, 'fields' => $fields)); $mail['message']['complete'] = $template->renderBlock('mailMessage', array('text' => html_entity_decode($mail['text']), 'fields' => $fields)); } $absender = "\n\nGesendet von der Webseite https://www.uni-due.de/biologiedidaktik/anmeldung_fortbildungen_chemotherapie.."; $mail['message']['compact'].=$absender; $mail['message']['complete'].=$absender; require_once '/cms/sw/php/include/form/mail.php'; } if (isset($db['server']) && isset($db['username']) && isset($db['password']) && isset($db['database']) && isset($db['table'])) { require_once '/cms/sw/php/include/form/db.php'; } echo $template->renderBlock('result', array('fields' => $fields)); if ($twigTemplateVariables['isContentOld'] == false) { echo '
'; } } } } ?>