I am working a module for my website at the moment, in which if a user is logged in they can rate there energy levels out of 10 and can monitor there results using a graph, I have the module semi working in that I can get the form to submit, however the post does not populate on the first submit, I have to go back to form and submit again before my post is filled with all the data. I don’t why this would happen, as I assumed that submitting a form would populate the post as the method is post, I have attached the module files for your viewing. I have also included the view files in the same folder. The second issue that once submitted I get forwarded onto a blank white screen, and not back to the page that user submitted the form from.
NOTE: This script works fine in Chrome, the errors seems to be in Firefox!? Not seen cross browser issues with POST before
This could potentially be a redirect issue because of a missing trailing slash in the action url. fetch_current_uri() returns the current uri with the trailing slash removed.
function fetch_current_uri()
{
return rtrim($this->remove_double_slashes($this->fetch_site_index(1).$this->EE->uri->uri_string), '/');
}Try this in your mod file:
$this->form_action = ( ! $this->EE->TMPL->fetch_param('form_action'))
? $this->EE->functions->fetch_current_uri() . '/'
: $this->EE->functions->create_url($this->EE->TMPL->fetch_param('form_action'), TRUE);Thanks for your reply the3mus1can I have tried your suggestion and I get the same outcome, select the ratings using the radio buttons in the form, click submit, form submits and user sees a white screen at the URL /index.php/ratings. My understanding might be off here but should EE serve the index page of the ratings.group folder?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.