Zum Inhalt springen

sr_feuser_register + checkbox validierung funktioniert nicht :(

Erstellt am 16. Mai 2008 · 2 Antworten · letzte Antwort am 16. Dezember 2008

Tags: Frontend-Benutzer, Frage

kerim80 ·

Hallo Forum,

ich habe mit Erfolg zusätzliche Felder mit dem Kickstarter in die fe_user-Tabelle hinzugefügt und möchte die Checkbox "tx_feuseraddonfields_data_protection_accepted" beim abschicken des Formulares überprüfen, ob bei diesem ein Häckchen drin ist.
-> die Checkbox erscheint.
-> es erscheint auch ein roter Stern neben dem Label, das besagt das dieses Feld ein MUSSFELD ist
-> Aber die Validierung dieser Checkbox funktioniert nicht
-> WARUM??? WEIS EINER RAT?

Das sind meine zusätzlichen Felder:

CREATE TABLE fe_users (
    tx_feuseraddonfields_orign tinytext NOT NULL,
    tx_feuseraddonfields_data_protection_accepted tinyint(3) DEFAULT '0' NOT NULL,
    tx_feuseraddonfields_newsletter tinyint(3) DEFAULT '0',
    tx_feuseraddonfields_theme_1 tinyint(3) DEFAULT '0',
    tx_feuseraddonfields_theme_2 tinyint(3) DEFAULT '0',
    tx_feuseraddonfields_theme_3 tinyint(3) DEFAULT '0',
    tx_feuseraddonfields_theme_4 tinyint(3) DEFAULT '0',
    tx_feuseraddonfields_theme_input_1 varchar(255) DEFAULT '',
    tx_feuseraddonfields_theme_input_2 varchar(255) DEFAULT '',
    tx_feuseraddonfields_job_cosmetics tinyint(3) DEFAULT '0',
    tx_feuseraddonfields_job_cosmetics_text int(11) DEFAULT '0'
);

Danach habe ich folgendes in meinem Template stehen:

<!-- ###SUB_INCLUDED_FIELD_tx_feuseraddonfields_data_protection_accepted### -->
<dt>
    <label for="tx-srfeuserregister-pi1-tx_feuseraddonfields_data_protection_accepted">###LABEL_TX_FEUSERADDONFIELDS_DATA_PROTECTION_ACCEPTED### ###REQUIRED_TX_FEUSERADDONFIELDS_DATA_PROTECTION_ACCEPTED###</label>
</dt>
<dd>
    <!-- ###SUB_ERROR_FIELD_tx_feuseraddonfields_data_protection_accepted### -->
    <p class="tx-srfeuserregister-pi1-error">###EVAL_ERROR_FIELD_TX_FEUSERADDONFIELDS_DATA_PROTECTION_ACCEPTED###</p>
    <!-- ###SUB_ERROR_FIELD_tx_feuseraddonfields_data_protection_accepted### -->
    <!-- ###SUB_REQUIRED_FIELD_tx_feuseraddonfields_data_protection_accepted### -->
    <p class="tx-srfeuserregister-pi1-error">###MISSING_TX_FEUSERADDONFIELDS_DATA_PROTECTION_ACCEPTED###</p>
    <!-- ###SUB_REQUIRED_FIELD_tx_feuseraddonfields_data_protection_accepted### -->
    ###TCA_INPUT_tx_feuseraddonfields_data_protection_accepted###
</dd>
<!-- ###SUB_INCLUDED_FIELD_tx_feuseraddonfields_data_protection_accepted### -->

in meinem Typoscript habe ich dann folgendes stehen:

formFields = ...,tx_feuseraddonfields_data_protection_accepted
requiredFields = ...,tx_feuseraddonfields_data_protection_accepted

LG
ERTAN

thomas_swoon ·

das liegt daran, dass das feld nur validiert ob ein inhalt drin ist oder nicht.
Wenn du zb ein textfeld statt einer checkbox nimms gehts.
wie es mit der checkbox geht habe ich auch noch nicht herausgefunden.