简体   繁体   中英

Prefill TYPO3 Powermail form from session?

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?

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();

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]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM