Reputation: 5132
Users can register for various events with powermail forms on a TYPO3 6.2 site. There is no shopping cart.
For a better ux, is it possible prefill typical fields in the register form based on the user's previous input?
For example, allow the user to control this with a checkbox "save my address for use in other forms", storing his address in a session, which can be reused to prefill the next form?
Upvotes: 1
Views: 932
Reputation: 5132
The solution is on
https://docs.typo3.org/typo3cms/extensions/powermail/ForAdministrators/GoodToKnow/SaveSession/Index.html and https://forge.typo3.org/issues/69507#change-274061
Save values to a session:
plugin.tx_powermail.settings.setup {
# Save submitted values in a session to prefill forms for further visits. Define each markername for all forms.
saveSession {
# Method "temporary" means as long as the browser is open. "permanently" could be used together with a frontend-user session. If method is empty, saveSession is deactivated.
_method =
firstname = TEXT
firstname.field = firstname
lastname = TEXT
lastname.field = lastname
}
}
[globalVar = GP:tx_powermail_pi1|field|checkboxmarkername|0 > 0]
plugin.tx_powermail.settings.setup.saveSession._method = temporary
[end]
Upvotes: 1
Reputation: 1041
you can do one thing for this, i think you can do this by simply using javascript. Store one address value with one variable and after on click/check event of radio/checkbox you can make same content copy there.
var addre1 = $('.residentAddress').val();
Upvotes: 0