Bug #35015

Field name allows space

Added by Rik Willems over 7 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2012-03-19
Due date:
% Done:

0%

TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The field name input field in the wizard is not checked for space characters. When you have a space in the field name the form doesn't work properly. On a required check the previous input can't be filled in the new form.


Related issues

Related to TYPO3 Core - Bug #28605: Default input field name attribute Closed 2011-07-31
Related to TYPO3 Core - Bug #36950: new form content element: input of OPTIONS >> ATTRIBUTES PROPERTIES >> NAME for a specific form element should be validated Closed 2012-05-08

History

#1 Updated by Jigal van Hemert over 7 years ago

  • Status changed from New to Needs Feedback

Can't reproduce this. If I use a field name with a space (e.g. "full name") the resulting HTML form will have a hyphen instead of a space ( e.g. <input id="field-3" name="tx_form[full-name]" type="text"/> ). The check for a field being required works as expected.

Can you put the form definition in this issue? That would make it a bit easier to test.

#2 Updated by Rik Willems over 7 years ago

Hi Jigal,

I jumped to conclusions too quickly. Like you say the field name doesn't have a space, but a dash.
But, use the definition below and try to fill the name and an invalid email. Now, the name field remains empty while the email field gets refilled.

prefix = tx_form
confirmation = 1
postProcessor {
    1 = mail
    1 {
        recipientEmail = 
        senderEmail = 
    }
}
10 = TEXTLINE
10 {
    name = uw naam
    label {
        value = Uw naam
    }
}
20 = TEXTLINE
20 {
    name = Bedrijfsnaam
    label {
        value = Bedrijfsnaam
    }
}
30 = TEXTAREA
30 {
    cols = 39
    rows = 5
    name = Uw_bericht
    label {
        value = Uw bericht
    }
}
40 = SELECT
40 {
    name = Selectieveld
    label {
        value = Selectieveld (test)
    }
    10 = OPTION
    10 {
        data = Option 1
    }
    20 = OPTION
    20 {
        data = Option 2
    }
    30 = OPTION
    30 {
        data = Option 3
    }
}
50 = SUBMIT
50 {
    name = 6
    value = Verzenden
}
rules {
    1 = required
    1 {
        breakOnError = 
        showMessage = 
        message = Verplicht veld
        error = Dit is een verplicht veld.
        element = uw naam
    }
    2 = email
    2 {
        breakOnError = 
        showMessage = 
        message = (naam@domein.nl)
        error = Dit is geen geldig e-mailadres.
        element = Bedrijfsnaam
    }
    3 = required
    3 {
        breakOnError = 
        showMessage = 
        message = Verplicht veld
        error = Dit is een verplicht veld.
        element = Uw_bericht
    }
    4 = required
    4 {
        breakOnError = 
        showMessage = 
        message = Verplicht veld
        error = Dit is een verplicht veld.
        element = Selectieveld
    }
}

#3 Updated by Alexander Opitz over 6 years ago

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.7 or 6.1)?

#4 Updated by Jigal van Hemert over 6 years ago

  • Status changed from Needs Feedback to Accepted

Confirmed with the setup in this issue.

#5 Updated by Mathias Schreiber almost 5 years ago

  • Status changed from Accepted to Closed
  • Is Regression set to No

Topic dupe of #36950, will continue there

#6 Updated by Bjoern Jacob over 4 years ago

  • Category changed from Form Framework to 1602

#7 Updated by Bjoern Jacob over 3 years ago

  • Category changed from 1602 to Form Framework

Also available in: Atom PDF