OK, so i basically use a before save logic hook to tell my users what not to do i.e.
SugarApplication::appendErrorMessage('check in date has to be before check out date');
after that I make a
SugarApplication::redirect('index.php?' . http_build_query($params).'&return_module=Leads&return_action=DetailView&offset=1');
This works perfectly. The issue is that I have many many many fields which need to be filled out, some have a check, some don’t, hence if any field is wrongly filled out, all the date (correct or incorrect is refreshed after the redirect.
How can I keep the data in tact, so that the poor user doesn’t have to re-enter everything ?