Hello,
I have a form (normal html) for date selection on my page. After both date fields have been filled, the form is submitted and couch shows the content all pages within that date range (one page is one row in a table).
The first field of the page is this dropdown:
When I open the page normally, this works as expected, with the last saved value being selected in the dropdown.
However, when I change the date, after post the opt_selected does not seem to work, it always shows the first value as selected (offen).
Any ideas?
Bonus weirdness: At first, the selection for the date range worked like this:
archivstartdatum and archiveenddatum were set with cms:set from the php $POST variables.
I now instead put the $POST variables into $SESSION variables and made the page refresh afterwards one time (and instead have archivstart/enddatum couch variables be set from the $SESSION variables.
After putting the POST variables into SESSION variables and after having couch put them into couch variables, I unset the Session variables.
With the additional refresh, the dropdowns again show the correct value, HOWEVER: If I now change the dropdown value and submit the page form (this is a databound form), I get the Security Token does not tally for that action error.
After I reverted back (no additional refresh, set couch variables from $POST), changing the dropdown value and then saving works correctly (but the shown dropdown value always is "offen" after POST).
Edit: I now believe this is the same error as here: viewtopic.php?f=4&t=11239&p=29553#p29553
By clearing out the Session variables, the number of pages displayed after submit would change (to 0 displayed rows/pages because the Session variables are empty). If I don't remove the Session variables (so that the amount of pages shown stays the same after a page refresh), it works as expected.
I have a form (normal html) for date selection on my page. After both date fields have been filled, the form is submitted and couch shows the content all pages within that date range (one page is one row in a table).
The first field of the page is this dropdown:
- Code: Select all
<cms:input class='statusdummy' name="<cms:show 'statusdummy' /><cms:show k_page_id />" type='dropdown' opt_values='offen|in Evidenz|genehmigt TL|genehmigt|abgelehnt|storniert' opt_selected="<cms:show status />" />
When I open the page normally, this works as expected, with the last saved value being selected in the dropdown.
However, when I change the date, after post the opt_selected does not seem to work, it always shows the first value as selected (offen).
Any ideas?
Bonus weirdness: At first, the selection for the date range worked like this:
- Code: Select all
<cms:pages masterpage='formular.php' custom_field="erl='ok' | internesdatum >= <cms:show archivstartdatum /> | internesdatum <= <cms:show archivenddatum />" >
archivstartdatum and archiveenddatum were set with cms:set from the php $POST variables.
I now instead put the $POST variables into $SESSION variables and made the page refresh afterwards one time (and instead have archivstart/enddatum couch variables be set from the $SESSION variables.
- Code: Select all
if ($_POST['archivstartdatum']) {
$_SESSION['archivstartdatum'] = $_POST['archivstartdatum'];
}
if ($_POST['archivenddatum']) {
$_SESSION['archivenddatum'] = $_POST['archivenddatum'];
}
if ($_POST['archivstartdatum'] && $_POST['archivenddatum']) {
header('Location: index_zes.php');
After putting the POST variables into SESSION variables and after having couch put them into couch variables, I unset the Session variables.
With the additional refresh, the dropdowns again show the correct value, HOWEVER: If I now change the dropdown value and submit the page form (this is a databound form), I get the Security Token does not tally for that action error.
After I reverted back (no additional refresh, set couch variables from $POST), changing the dropdown value and then saving works correctly (but the shown dropdown value always is "offen" after POST).
Edit: I now believe this is the same error as here: viewtopic.php?f=4&t=11239&p=29553#p29553
By clearing out the Session variables, the number of pages displayed after submit would change (to 0 displayed rows/pages because the Session variables are empty). If I don't remove the Session variables (so that the amount of pages shown stays the same after a page refresh), it works as expected.