in V2 i made an http-upload procedure that displayed the resulting web page when posting a bug report. My question was how to do this in V3.
After inspecting the code i noticed redirection is supported for the result, so if i want to display some additional info, i need to set the location-header in PHP:
Yup, works nice.
I'm only thinking about how to implement this feature in real-life. In the redirected page I can only use GET-parameters so i need to store all relevant information in the database and on the result page i need to extract this info. Or store it in session cookies etc, but i'm not that experienced in php and asp...
Most of the time the redirect would be extracting the solution from the database (only record ID needed in GET) if available, so that won't be much of a problem.
I have trouble getting the assistant vars to upload. I want to set the user name and email as POST-vars. But i don't know how to intercept the fields between the assistant and the actual sending. Registering an action-handler did not work because it is called BEFORE the assistants are executed.
I add all intended fields (like crc1 & 2) as POST -vars by adding to the mesettings.additionalfields. Works OK but now i want the three fields from the assistant. I don't want to extract them from the bug-report because that's quite complicated.
Maybe an assistant option should be to add all fields to the additionalfields values (or option of edit field).
Solved it: a MailFrom is always set in the POST fields. Because i POSTed the bugreport also and the red function only reads 5120 bytes this was discarded . I think i should read the contents from the report from the file but this was easier.
I added the line
exc.AdditionalFields.Add(nve.OutputName, nve.Text);
to the PutAssisIntoBugreport to post all edit fields. Worked but not neccesary anymore.
You can add additional fields without having to change madExcept.pas. Just use RegisterExceptionHandler or RegisterExceptActionHandler and write to "exceptIntf.AdditionalFields".
No, this is not sufficient, because there seems to be no handler being fired AFTER the assistants have been executed (and form field are filled). And my goal was to save the field data to POST fields (instead of being added to the bugreport).
Created a separate unit i only have to include in my project, that serves all my needs. I think i will all settings to it (like server address etc, i now made them default).