Feature #69176

Fix Layout handling for Form generation

Added by Marc Neuhaus almost 4 years ago. Updated almost 4 years ago.

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

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Currently it's not possible anymore to change the style of default form extension
through the "default" typoscript because every part of the form extension
then uses the same layout for form, confirmation and postprossessing rendering.
This makes of course no sense, because, as soon as you change the layout
to output a nice form, the same layout will be used to send the e-mail, which
will only contain the form itself again.


Related issues

Related to TYPO3 Core - Feature #54654: Customize confirmation page Closed 2013-12-30
Related to TYPO3 Core - Bug #32463: New Form ext throws error on missing wraps Closed 2011-12-12

History

#1 Updated by Gerrit Code Review almost 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/42738

#2 Updated by Gerrit Code Review almost 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/42738

#3 Updated by Bjoern Jacob almost 4 years ago

Thanks Marc for your patch. Could you please provide a TypoScript example which allows some testing?

#4 Updated by Marc Neuhaus almost 4 years ago

Sure :)

Example that fails and renders a input on confirmation + postProcessing (typoscript setup):

tt_content.mailform.20.layout {
    textline (
        <label />
        <input class="form-control" />
    )
}

Example that only renders the custom input html in the form view (typoscript setup):

tt_content.mailform.20.formLayout {
    textline (
        <label />
        <input class="form-control" />
    )
}

so form setup to test this typoscript:

    enctype = multipart/form-data
    method = post
    prefix = tx_form
    confirmation = 1
    postProcessor {
        1 = mail
        1 {
            recipientEmail = apocalip@gmail.com
            senderEmail = apocalip@gmail.com
        }
    }
    10 = TEXTLINE
    10 {
        name = foobar
        label {
            value = foobar
        }
    }

#5 Updated by Bjoern Jacob almost 4 years ago

  • Tracker changed from Bug to Feature

#6 Updated by Bjoern Jacob almost 4 years ago

Here's the code I've used for testing this issue:


enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 1
postProcessor {
    1 = mail
    1 {
        recipientEmail = your@mail.com
        senderEmail = your@mail.com
    }
}
10 = TEXTLINE
10 {
    name = foobar
    label = foobar
}
20 = SUBMIT
20 {
    name = submit
}

TS settings, before patch. Only way to change layout of specific element on global base.


tt_content.mailform.20.layout {
    textline (
        <label />
        <input class="form-control" />
    )
}

TS settings, after patch. Now one is able to change the specific steps (form, confirmation, postproces/ mail).


# New stuff after patch
#form
#confirmation
#postProcessing
tt_content.mailform.20.formLayout {
    textline (
        <label />
        <input class="form-control" />
    )
}

tt_content.mailform.20.confirmationLayout {
    textline (
        <label />
        <span style="color:red;"><inputvalue /></span>
    )
}

tt_content.mailform.20.postProcessingLayout {
    textline (
        <td style="width: 200px;">
            <label />
        </td>
        <td>
            <span style="color:red;"><inputvalue /></span>
        </td>
    )
}

#7 Updated by Gerrit Code Review almost 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/42738

#8 Updated by Gerrit Code Review almost 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/42738

#9 Updated by Gerrit Code Review almost 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/42738

#10 Updated by Gerrit Code Review almost 4 years ago

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

#11 Updated by Gerrit Code Review almost 4 years ago

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

#12 Updated by Gerrit Code Review almost 4 years ago

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

#13 Updated by Ralf Zimmermann almost 4 years ago

  • Status changed from Under Review to On Hold

I change this to "on hold". I rewrite forms to use fluid. If this is done you are able to define templates and partial for each layout section.

#14 Updated by Benni Mack almost 4 years ago

  • Status changed from On Hold to Closed

this is fixed in v7.

#15 Updated by Bjoern Jacob almost 4 years ago

@Marc: please checkout the rewritten form extension. It is now part of 7.5. If the new solution does not suit your needs please open a new ticket for your feature request. Thx.

Also available in: Atom PDF