Clear form not working for Dropdowns

Co Collie-IT 06 Oct, 2020
Dear Support,
I noted that clear/reset not clears the Dropdowns var informations if I had searched before.
I can clear single entrys from the dropdown, but if I will clear it compleat (in case of a search mask) the selected dropdowns will be empty in the on load view, but not cleared in submit view. Is is posible to change the behavior for cleaned dropdowns?
​
Best regards
Collie-IT
Max_admin Max_admin 23 Oct, 2020
I did the following test, used a multi selection form, selected few entries, cleared them with a "Clear/Reset" button, then submit the form, the dropdown data is empty!
​
How does this work for you ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Co Collie-IT 24 Oct, 2020
[div wfd-id="67"]The dropdown will beshown clear, but in the submit action the $_Session information overwrites the changed informations.[/div]
Max_admin Max_admin 24 Oct, 2020
no, for me the form data array in the debug shows the dropdown value as empty, what do you mean by "session" information ? please post a screenshot!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Co Collie-IT 24 Oct, 2020
[div wfd-id="276"]The $_SESSION variable is a standard php variable. [div wfd-id="275"]​[div wfd-id="274"]The problem is that the dropdown values get regenerated only if you remove all. See following screenshots.[div wfd-id="273"]​[div wfd-id="282"]Clear form not working for Dropdowns image 1[div wfd-id="293"]​[div wfd-id="291"]Clear form not working for Dropdowns image 2[div wfd-id="290"]​[div wfd-id="295"]Clear form not working for Dropdowns image 3[div wfd-id="297"]Clear form not working for Dropdowns image 4
​
If I do clear the $_SESSION and the $this->data variable with something (I recomend do both) like this:
​
if(isset($this->data)){
foreach($this->data as $dadkey => $dad){
unset($this->data[$dadkey]);
unset($_SESSION["gcore"]["Search"]["_data"]["form"][$dadkey]);
}
}
​
Then it works right.
This topic is locked and no more replies can be posted.