Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Refresh Page from within Vanilla
When an error occurs I want the post.php page to reload and display the error
right now I have this code
First I do not want to track incoming string and track the CommentID or Category ID. I need a simple way to just refresh the page
Second I have added the errors. but when post.php loads the error is not displayed. is there something more that I have to do to get it to display. post.php already has the error placeholders.
right now I have this code
$Context->WarningCollector->Add($Context->GetDefinition('WrongDateFormat'));
header('Location: '.GetUrl($DiscussionForm->Context->Configuration, 'post.php', '', 'CommentID', $CommentID, '', ''));
First I do not want to track incoming string and track the CommentID or Category ID. I need a simple way to just refresh the page
Second I have added the errors. but when post.php loads the error is not displayed. is there something more that I have to do to get it to display. post.php already has the error placeholders.
0
This discussion has been closed.
Comments
This doesn't happen if there are no Vanilla errors and only my fields are resulting in error.
there should be a way to tell Vanilla that there are errors other than its own, that need to be displayed and the page reloaded.
enter date, if wrong it displays error and disables the Save button
thats one way around this.
Edit.
Done
Do date validation during PreSaveDiscussion. If error it displays error. and doesn't save
Saving the Date is done during PostSaveDiscussion
Only problem now if the date is wrong, it goes to its default value of blank. rather than reload the wrong one again. which is what it should do.
Added support for next week and so using strtotime.
thanks Wallygator