Bug #37453
Provide backaction
| Status: | Resolved | Start date: | 2012-05-23 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Nicole Cordes | % Done: | 0% |
|
| Category: | Frontend Plugin | |||
| Target version: | 1.7.x | |||
| Votes: | 0 |
Description
I use Powermail in my custom extension, where it is conditionally included. In order to prefill a field I add GET parameter event which I then add to formaction:
plugin.tx_powermail_pi1.formaction.typolink.additionalParams.cObject.40 = TEXT
plugin.tx_powermail_pi1.formaction.typolink.additionalParams.cObject.40.value = &event={GPVar:event}
plugin.tx_powermail_pi1.formaction.typolink.additionalParams.cObject.40.insertData = 1
The problem is that when a captcha is wrongly submitted, I get an error form with Go back button. However, this button doesn't have this event parameter anymore, so when I go back, the field is not prefilled anymore.
In order to fix it, I've added a new conf option "backaction":
plugin.tx_powermail_pi1.backaction = TEXT
plugin.tx_powermail_pi1.backaction {
typolink.parameter.data = TSFE:id
typolink.returnLast = url
typolink.useCacheHash = 1
typolink.additionalParams.cObject < plugin.tx_powermail_pi1.formaction.typolink.additionalParams.cObject.40
}
and used it in class.tx_powermail_mandatory.php this way:
if (empty($this->conf['backaction.'])) {
$targetLinkParams = array(
'returnLast' => 'url',
'parameter' => $GLOBALS['TSFE']->id,
'useCacheHash' => 1,
#'no_cache' => 1
#'section' =>
);
$this->markerArray['###POWERMAIL_TARGET###'] = $this->cObj->typolink('x', $targetLinkParams) . '#c' . $anchorId;
} else {
$this->markerArray['###POWERMAIL_TARGET###'] = $this->cObj->cObjGetSingle($this->conf['backaction'], $this->conf['backaction.']);
}
It would be great to accomodate this in some sort into powermail.
History
Updated by Alex Kellner about 1 year ago
- Status changed from New to Rejected
- Assignee set to Alex Kellner
Hi Jan,
thank you for your hint, but we're going to release the new version of powermail in a few days.
The new version is a complete redesign (see trunk).
Alex
Updated by Philipp Kitzberger 11 months ago
we'd appreciate the ability to set the backlink action via typoscript as well. our concrete objective is to add the typolink section to the backlink of the confirmation page. in this and most of our other projects we'd like to continue to use the 1.x branch of powermail and not upgrade to 2.x. please let us know, if you'd like us to write some patch for this...
grüße, philipp
Updated by Alex Kellner 11 months ago
- Category set to Frontend Plugin
- Status changed from Rejected to Needs Feedback
- Assignee changed from Alex Kellner to Nicole Cordes
- Target version set to 1.7.x
Philipp,
Nicole supports version 1.7.x - maybe she can help you
Alex
Updated by Nicole Cordes 8 days ago
- Status changed from Needs Feedback to Resolved