In form I have field type dropdown with multiselect.
if I give this field to email, only the last choice, not all
eg. {dropdown14} show only last selection
Thank you in advance for your advice
if I give this field to email, only the last choice, not all
eg. {dropdown14} show only last selection
Thank you in advance for your advice
Hi ernst,
Please change the name to an array name with [] at the end e.g. dropdown14[]
And please drag a Handle Arrays action into the OnSubmit event and move it up before any Email or DB Save actions.
Bob
PS I recommend that you do not use your email address as a username here as it is publicly visible and may be scraped and spammed. If you PM me I can change that for you.
Please change the name to an array name with [] at the end e.g. dropdown14[]
And please drag a Handle Arrays action into the OnSubmit event and move it up before any Email or DB Save actions.
Bob
PS I recommend that you do not use your email address as a username here as it is publicly visible and may be scraped and spammed. If you PM me I can change that for you.
Thank you very much. It's working OK.
And I have one more question?
How can I get myself after sending the form back to the page that was called ?.
I use a redirect, but I do not know how?
How can I get myself after sending the form back to the page that was called ?.
I use a redirect, but I do not know how?
Hi ernst,
You can use an Event Loop action as the last action in the form On Submit event. That will reload the form - you may find that existing values are re-loaded, if you don't want that to happen you can unset them before the Event Loop.
Bob
You can use an Event Loop action as the last action in the form On Submit event. That will reload the form - you may find that existing values are re-loaded, if you don't want that to happen you can unset them before the Event Loop.
Bob
I guess I was badly expressed
I do not need to get back to the form but to the page from which the form was called.
I do not need to get back to the form but to the page from which the form was called.
That is a good idea.
I get the variable value of the url and it can using php function (strpos, substr etc.) changed.
But as, after submitting the form to call this URL?
Redirect does not support {page_url}
I get the variable value of the url and it can using php function (strpos, substr etc.) changed.
But as, after submitting the form to call this URL?
Redirect does not support {page_url}
Hi Ernst,
There ia a way to over-write the URL In the ReDirect but it's a bit techie. The simplest solution is to use the Joomla! redirection code in a Custom Code action:
If you need to remove the $form->data[''] first:
Bob
There ia a way to over-write the URL In the ReDirect but it's a bit techie. The simplest solution is to use the Joomla! redirection code in a Custom Code action:
<?php
$app = \JFactory::getApplication();
// $app->enqueueMessage('Some message here'); // Use this to show a system message
$app->redirect($form->data['page_url']);
?>
If you need to remove the $form->data[''] first:
<?php
$app = \JFactory::getApplication();
// $app->enqueueMessage('Some message here'); // Use this to show a system message
$url = $form->data['page_url'];
unset($form->data);
$app->redirect($url);
?>
!! Not tested and may need debugging !!
Bob
So I finally got to test and resolve this problem.
To summarize, I needed after sends the form to return to the page from which the form was called.
1. In ChronoForms the designer to specify custom fields with the following content:
Leave the field without a label, it will not appear at all.
2 to email, you can add information to a form where it was called, for example,
3. Forwarding can not use the redirect, but after sending emails or other events can finally insert custom fields with the following content:
It might be worth incorporating this solution directly into future versions ChronoForms.
To summarize, I needed after sends the form to return to the page from which the form was called.
1. In ChronoForms the designer to specify custom fields with the following content:
<input type='hidden' name='page_url' id='page_url' value='<?php echo JFactory::getApplication()->input->server->get('HTTP_REFERER', '', 'raw'); ?>' />
Leave the field without a label, it will not appear at all.
2 to email, you can add information to a form where it was called, for example,
<tr><td>Mám zájem o:</td><td>{dropdown15}</td></tr>
<tr><td>Bližší popis požadavku:</td><td>{textarea16}</td></tr>
<tr><td>Odesláno z adresy:</td><td>{page_url}</td></tr>
</table>
3. Forwarding can not use the redirect, but after sending emails or other events can finally insert custom fields with the following content:
<?php
$app = \JFactory::getApplication();
$url = $form->data['page_url'];
unset($form->data);
$app->redirect($url);
?>
It might be worth incorporating this solution directly into future versions ChronoForms.
This topic is locked and no more replies can be posted.