Web lead form redirect to same page shows form field values!

I created a web to lead form to insert into a web page I have. Once the form is submitted, the page should reset. I don’t want to redirect to a different page and I don’t want it to go to the default page showing a Thank you message so I put the URL of the form page in the redirect_url input field. Although the form page reloads after submission, the URL now shows all the fields which were submitted! I found a year old post on the SugarCRM community 6.5 edition with someone complaining about the same problem. It seems that it hasn’t been fixed in SuiteCRM. Can someone please help me find a solution? Thanks!

Any suggestions on this???

The values are passed to the redirect page. And this behaviour is useful in many circumstances.

Therefore you have to handle it in your page (which is not the CRM). You could just add some very simple logic with a hidden field and initialise all the form field values (you could initialise them even without any logic).

I don’t know how to redirect on another page after clicking the submit button.
It shows me only: MYredirecturl/?entryPoint=WebToLeadCapture&last_name=&first_name=&patronymic_c=&birthdate=&birthdate_month=&birthdate_day= and e.t.c
I need to go only on MYredirecturl and thats all.

What i need to paste in my html code to do that?

Have you tried reloading the page with Ctrl-F5 ?
If, after doing this, the form fields are empty it means that the browser is reloading the page from its cache so you should tell your browser not to do it.

Otherwise,to initialise the form variables you are better off if you use a php script.

From what I understand this is what you did:

  1. From within SuiceCRM you created a web to lead form
  2. You then created a .html file in which you pasted the form

If this is the case there are various ways to achieve this.

(the following is the fastes way but I would use it only for testing, Personally I would prefer to run some logic)
The fastest way to do it is just to initialise the input fields directly in the fields themselves.
To do it try do the following:

  1. rename your .html to .php
  2. Then find below, in the form code the input elements and in in each form element you have to initialise its value. For example, for last_name:
<input id="last_name" type="text" name="last_name" value = '<?php echo $last_name ?>'>

Repeat this for all variables.

Be careful! To do this you should have some programming knowledge and you must know which input elements need to be initialised.
The form may contain hidden fields as well as other fields that may not need to be initialised so, whatever you do is at your own risk.
I also recomment that you take a backup before you do anything.


SugarApplication::appendErrorMessage("<div class='alert alert-{$level} alert-dismissable fade in'><a href='#' class='close' data-dismiss='alert' aria-label='close'>x</a><strong>{$state} ! </strong> {$msg}</div>");
	$queryParams = array(
	    'module' => $currentModule,
	    'action' => $action,
	SugarApplication::redirect('index.php?' . http_build_query($queryParams));