How to fix the faulty mailform output since TYPO3 6.2.47 ELTS? - typo3

Since the last update to TYPO3 6.2.47 ELTS forms (the old core forms; without use of sysext "form") are no longer rendered normally ...
<input type="text" name="name" id="mailformname" size="30" value="" />
... but the input fields seem to be sent through an HTML encoder. It now looks like this in the source code:
<input type="text" name="name" id="mailformname" size="30" value="" />
How can this be fixed?
I couldn't find anything related to this in the changelog.

There's a new parseFunc, which is responsible for the issue
tt_content.mailform.20.stdWrap.parseFunc =< lib.parseFunc
You can overwrite this as follows
tt_content.mailform.20.stdWrap.parseFunc >

Related

Typo3 Backend HTML Element - Format value wrong

I have a problem: when I create a HTML-Element in the Backen of Typo3 (Version 9) and save it with some HTML-Content. All fine so far the output on the frontend works perfect. But when I want to edit, it seems like that the backend want to parse it wrong - I got the output as following: all tags are HTML-Entities now and the code is wrapped in some p-Tags (when I want to save now the code is saved this way to the db and frontend gets also wrong output for these element).
Does anybody have the same issue or an solution?
<p><form action="/action_page.php"> <label for="fname">First name:</label><br> <input type="text" id="fname" name="fname" value="John"><br> <label for="lname">Last name:</label><br> <input type="text" id="lname" name="lname" value="Doe"><br><br> <input type="submit" value="Submit"> </form></p>
The extension responsible for the code highlighting is t3editor (typo3/cms-t3editor). You can deactivate or remove it.
I cannot reproduce this problem in a v9.5.26.

Modifying TYPO3 form.checkbox hiddenfield

When the following code is added to a partial HTML class in TYPO3.
<f:form.checkbox id="myCheckBox" property="myCheckBox" value="Y" multiple="no" />
When the form is loaded within a TYPO3 extension the following code is generated for the checkbox
<input type="hidden" name="form[newForm][myCheckBox]" value="" />
<input id="myCheckBox" type="checkbox" name="form[newForm][myCheckBox]" value="Yes" />
Is there a way of adding the parameter ID to the auto generated hidden field so we have:
<input type="hidden" id="myCheckBoxHidden" name="form[newForm][myCheckBox]" value="" />
<input id="myCheckBox" type="checkbox" name="form[newForm][myCheckBox]" value="Yes" />
Using TYPO3 7.6.13
I think you could extend the CheckboxViewHelper and add the id attribute as you needed, and then use your new VH instead.

How can I pass variables from 2 separate forms on one cfm to another cfm in coldfusion?

I have 2 forms on one page that I need to pass to the same page to assemble a pdf. How can I do that? I have tried using a action="post" for one and action="get" for the other, but I can't get that to work. I have tried assigning one form to session variables, but I can't get that either. Any suggestions??
<form name="formOne" id="formOne" method="post" action="#buildURL('goTothisPage.page')#">
<input name="name" id="name" autofocus="true" >
<input name="address" id="address" >
I would try just creating one big form instead of 2 smaller forms if the action is going to be the same and go to the same .cfm page. (Just expand the scope of your tags)
You can also create 2 "Submit" buttons (1 for each form) to make it appear as 2 separate forms, even though the buttons will submit the same form.
If it is required to have two separate forms in your html, it is also possible to forge the form values from one form into the other at the moment of the submit event.
HTML:
<form name="formOne" id="formOne" method="post">
<input name="name" id="name" type="text" >
<input name="address" id="addressHidden" type="hidden">
</form>
<form name="formTwo" id="formTwo" method="post">
<input name="address" id="address" type="text">
<input name="name" id="nameHidden" type="hidden" >
</form>
Javascript:
$(document).ready(function(){
$('#formOne').submit(function(event){
$('#addressHidden').val($('#address').val());
return true;
});
// same for #formTwo
$('#formTwo').submit(function(event){
$('#nameHidden').val($('#name').val());
return true;
});
});

How can I conditionally require form inputs with AngularJS?

Suppose we're building an address book application (contrived example) with AngularJS.
We have a form for contacts that has inputs for email and phone number, and we want to require one or the other, but not both: We only want the email input to be required if the phone input is empty or invalid, and vice versa.
Angular has a required directive, but it's not clear from the documentation how to use it in this case. So how can we conditionally require a form field? Write a custom directive?
There's no need to write a custom directive. Angular's documentation is good but not complete. In fact, there is a directive called ngRequired, that takes an Angular expression.
<input type='email'
name='email'
ng-model='contact.email'
placeholder='your#email.com'
ng-required='!contact.phone' />
<input type='text'
ng-model='contact.phone'
placeholder='(xxx) xxx-xxxx'
ng-required='!contact.email' />
Here's a more complete example: http://jsfiddle.net/uptnx/1/
if you want put a input required if other is written:
<input type='text'
name='name'
ng-model='person.name'/>
<input type='text'
ng-model='person.lastname'
ng-required='person.name' />
Regards.
For Angular2
<input type='email'
[(ngModel)]='contact.email'
[required]='!contact.phone' >
Simple you can use angular validation like :
<input type='text'
name='name'
ng-model='person.name'
ng-required='!person.lastname'/>
<input type='text'
name='lastname'
ng-model='person.lastname'
ng-required='!person.name' />
You can now fill the value in only one text field. Either you can fill name or lastname. In this way you can use conditional required fill in AngularJs.
In AngularJS (version 1.x), there is a build-in directive ngRequired
<input type='email'
name='email'
ng-model='user.email'
placeholder='your#email.com'
ng-required='!user.phone' />
<input type='text'
ng-model='user.phone'
placeholder='(xxx) xxx-xxxx'
ng-required='!user.email' />
In Angular2 or above
<input type='email'
name='email'
[(ngModel)]='user.email'
placeholder='your#email.com'
[required]='!user.phone' />
<input type='text'
[(ngModel)]='user.phone'
placeholder='(xxx) xxx-xxxx'
[required]='!user.email' />
For Angular 2
<input [(ngModel)]='email' [required]='!phone' />
<input [(ngModel)]='phone' [required]='!email' />

Typo3 and Mailformplus - form not showing

I have a client with an existing Typo3 site but I'm completely new to the CMS.
I need to add an email signup form. The site already has Mailformplus installed for the contact form.
I've added the plugin to the page. Uploaded an HTML template, and modified a copy of the Typoscript that (I think) is required in a new template.
The title for the form appears (from the plugin record) but none of the form elements. Not even an error.
What have I missed? Where should I look?
HTML:
<!-- ###TEMPLATE_FORM### begin -->
<div class="mailformplus_contactform">
###ERROR###
<form name="Formular" method="post" action="###REL_URL###" enctype="multipart/form-data">
<fieldset>
<legend>###LLL:legend###</legend>
<input type="hidden" name="id" value="###PID###" />
<input type="hidden" name="submitted" value="1" />
<input type="hidden" name="L" value="###value_L###" />
<input type="hidden" name="type" value="###value_type###" />
<label for="name">###LLL:name######required_name###</label>
<input type="text" name="name" id="name" value="###value_name###" />
<label for="company">###LLL:company###</label>
<input type="text" name="company" id="company" value="###value_company###" />
<label for="email">###LLL:email######required_name###</label>
<input type="text" name="email" id="email" value="###value_email###" />
<p>###LLL:required_fields###</p>
<input type="submit" value="###LLL:submit###" />
</fieldset>
</form>
</div>
Typoscript:
plugin.tx_thmailformplus_pi1 {
correctRedirectUrl = 1
# emailHeader =
langFile = fileadmin/template/xtra/mailformplus-locallang.xml
}
plugin.tx_thmailformplus_pi1.fieldConf {
name.errorCheck = required
company.errorCheck = required
email.errorCheck = required, email
}
### INFO #################################################
# BETREFF und Empfänger / Config extra von Mailformplus. #
# Mit Listenansicht auf die Contactseite. #
##########################################################
plugin.tx_thmailformplus_pi1.default {
email_to = simon.boak#gmail.com
email_subject = Newsletter Subscription
email_sender = simon.boak#gmail.com
email_redirect = 90
email_requiredfields =
email_htmltemplate =
email_replyto =
email_sendtouser = email
email_subject_user = TEXT
email_subject_user.value = Danke für Ihre Anfrage bei Company
email_subject_user.lang.en = Thank you for your request at Company
}
Set plugin.tx_thmailformplus_pi1.debug = 1
Your setup is really missing the template-setting
Your HTML is missing <!-- ###TEMPLATE_FORM### end --> at the end of the form.
As of point 5 in Matengs answer: Rather than reinstalling mailformplus (which is obsolete and not maintained anymore) use formhandler which is the successor of mailformplus
1.
Start checking the source code of the frontend output. Does it contain parts of your HTML template? (e.g. class="mailformplus_contactform").
2.
If not, make sure the path to the template is correct. It is set in:
plugin.tx_thmailformplus_pi2.template
If the path is correct, the source code of the template should be displayed at least.
3.
Did the extension installation finish successfully? Many extensions won't work if the necessary database tables didn't install properly. You can check in the extension manager.
4.
Furthermore, use the typoscript object browser (in module template) to verify that TYPO3 "accepted" your typoscript setup. Make sure you are on the page where you inserted the mailformplus plugin. Use the search field for that. Maybe your modified typoscript gets overridden somewhere. More hints on debugging typoscript.
5.
If that does not help, backup your current configuration and try to install mailfomrplus from the scratch - does it work when you don't use an individual configuration ?
6.
Come back here to discuss your results.