Task #70071

Epic #69955: Optimize new Extbase/ Fluid based rewrite of EXT:form

Story #70068: EXT:form - Support bootstrap_package

EXT:form - Allow <error /> and <mandatory /> elements outside of <label /> element

Added by Bjoern Jacob about 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Category:
Form Framework
Target version:
Start date:
2015-09-24
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Sprint Focus:
Stabilization Sprint

Description

Right now the following setup is not interpreted as expected:


textline (
    <div class="form-group">
        <div class="col-sm-3 control-label">
            <label />
        </div>
        <div class="col-sm-9">
                <input class="form-control" />
                <error />
        </div>
    </div>
)

Associated revisions

Revision 86675b49 (diff)
Added by Ralf Zimmermann about 4 years ago

[TASK] EXT:form - allow <error /> and <mandatory /> outside of <label />

Allow <error /> and <mandatory /> tags outside of a <label /> tag.

Resolves: #70071
Releases: master
Change-Id: Ibac5445711bfe982e3f0c06bb239f4f2fbd66c0d
Reviewed-on: http://review.typo3.org/43525
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>
Reviewed-by: Jan Helke <>
Tested-by: Jan Helke <>
Reviewed-by: Oliver Hader <>
Tested-by: Bjoern Jacob <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review about 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43525

#2 Updated by Gerrit Code Review about 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43525

#3 Updated by Gerrit Code Review about 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43525

#4 Updated by Benni Mack about 4 years ago

  • Sprint Focus set to Stabilization Sprint

#5 Updated by Bjoern Jacob about 4 years ago

Example form to test this issue:


prefix = tx_form
confirmation = 1

# does not work when inserted via backend - which is intended because of security reasons
stdWrap.wrap = <div class="outerWrap">|</div>

postProcessor {
    1 = mail
    1 {
        recipientEmail = mail@email.com
        senderEmail = mail@email.com
        subject = Contactform website
        messages {
            success = TEXT
            success {
                value = Hartelijk dank voor uw reactie. Wij zullen uw vraag zo spoedig mogelijk beantwoorden.
            }
        }
    }
}

layout {
    containerWrap (
        <div class="containerWrap">
            <elements />
        </div>
    )

    elementWrap (
        <div class="elementWrap">
            <element />
        </div>
    )

    label (
        <div class="label">
            <label>
                <labelvalue />
                <mandatory />
                <error />
            </label>
        </div>
    )

    textline (
        <div class="form-group">
            <div class="col-sm-3 control-label">
                <label />
            </div>
            <div class="col-sm-9">
                    <input class="form-control" />
                    <error />
            </div>
        </div>
    )

    error (
        <span class="help-block text-danger"><errorvalue /></span>
    )

    submit (
        <div class="form-group">
            <div class="col-sm-offset-3 col-sm-9">
                <label />
                <input class="btn btn-primary" />
            </div>
        </div>
    )
}

10 = TEXTLINE
10 {
    name = name
    placeholder = Naam*
    label {
        value = Naam
    }
}
20 = TEXTLINE
20 {
    name = company
    placeholder = Bedrijf/organisatie
    label {
        value = Bedrijf/organisatie
    }
}
30 = TEXTLINE
30 {
    name = emailaddress
    placeholder = E-mailadres*
    label {
        value = Emailadres
    }
}
40 = TEXTLINE
40 {
    name = phonenumber
    placeholder = Telefoonnummer
    label {
        value = Telefoonnummer
    }
}
50 = TEXTAREA
50 {
    cols = 40
    rows = 10
    name = 5
    placeholder = Uw bericht...
    label {
        value = Uw bericht...
    }
}
60 = SELECT
60 {
    name = select
    label = Select
    10 = OPTION
    10 {
        name = option1
        value = option1
        data = Option 1
    }
    20 = OPTION
    20 {
        name = option2
        value = option2
        data = Option 2
    }
}
70 = CHECKBOX
70 {
    name = checkbox
    value = checkbox
    label = Checkbox
}
1000 = FIELDSET
1000 {
    legend = Submit
    10 = SUBMIT
    10 {
        name = submit
        value = Verzenden
    }
}
rules {
    1 = required
    1 {
        breakOnError = 0
        showMessage = 1
        message = *
        error = Dit veld is verplicht
        element = name
    }
    2 = required
    2 {
        breakOnError = 0
        showMessage = 1
        message = *
        error = Dit veld is verplicht
        element = emailaddress
    }
    3 = required
    3 {
        breakOnError = 0
        showMessage = 1
        message = *
        error = Dit veld is verplicht
        element = 5
    }
    4 = required
    4 {
        breakOnError = 0
        showMessage = 1
        message = *
        error = Dit veld is verplicht
        element = select
    }
    5 = required
    5 {
        breakOnError = 0
        showMessage = 1
        message = *
        error = Dit veld is verplicht
        element = checkbox
    }
}

#6 Updated by Gerrit Code Review about 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43525

#7 Updated by Gerrit Code Review about 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43525

#8 Updated by Ralf Zimmermann about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#9 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF