Discussion:
[TYPO3-english] Form Framework - Frontend rendering generates a bad action
Peter Rosinsky
2017-10-20 09:48:27 UTC
Permalink
Hi guys. I have a problem with form framework in typo3 v. 8.7.8

The Url address in the form which is embedded in the site content is OK
/?ajax=1&tx_form_formframework%5Baction%5D=perform&tx_form_formframework%5Bcontroller%5D=FormFrontend&cHash=503549aca041d1cbf99b7c288282e943#newsleterForm

The Url address in the form which is embedded using fluid template generates wrong url address
/?ajax=1&tx__%5Baction%5D=perform&tx__%5Bcontroller%5D=Standard&cHash=ee96f42474e7bc2f9f4d87d89e35ac39#newsleterForm


html code:

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true">
<!-- Modal -->
<div id="newsletterModal" class="modal fade" role="dialog">
<div class="modal-dialog">

<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><f:translate key="LLL:fileadmin/Language/locallang.xlf:domain_model_breadcrumb.subscribe_to_newsletters"></f:translate></h4>
</div>
<div class="modal-body">

<formvh:render persistenceIdentifier="1:/introduction/form/newsletter.yaml" />

</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><f:translate key="LLL:fileadmin/Language/locallang.xlf:domain_model_breadcrumb.close"></f:translate></button>
</div>
</div>

</div>
</div>
</html>

yaml config code:

renderingOptions:
submitButtonLabel: Odoslať
additionalParams: {'ajax':1 }
controllerAction: perform
httpMethod: post
httpEnctype: multipart/form-data
identifier: newsleterForm
label: 'Newsleter Form'
type: Form
prototypeName: standard
finishers:
-
identifier: SaveToDatabase
options:
table: tx_ns_newsletter
mode: insert
databaseColumnMappings:
first_name:
value: '{data_firstname}'
last_name:
value: '{data_lastname}'
email:
value: '{data_email}'
renderables:
-
renderingOptions:
type: Page
identifier: page-1
renderables:
-
defaultValue: Meno
type: Text
identifier: data_firstname
label: Meno
-
defaultValue: 'Priezvisko'
type: Text
identifier: data_lastname
label: Priezvisko
-
defaultValue: 'peto.rosinsky (at) gmail.com'
type: Text
identifier: data_email
label: Email


How can I set up JSON response when sending out the form via jQuery ajaxForm?
Loading...