Edting The Submit A Report Mechanism


#1

Hi Sir,


I want to change the mechanism of submitting a report in ushahidi with some additional parameters like incident location and time ,date and also if i want to add some more columns to submitting form mechanism.


To add additional columns which files i have to refer and which files i have to modify to customize the mechsnism.


Thank you .



#2

Incident location, time, and date are already on the report submit form, so I don't get that part of the question. But to add new fields, start with the reports_submit.php in you theme's view folder. That is where you will add elements to the form so the user can add the required data.


You will need to edit the reports_view.php in the same folder to let others see the additional fields.


Then look at /applications/controllers/reports.php to process/validate the incoming and outgoing data.


If you want to modify what the user submits as location, time and date, you can write a plugin that hooks into the ushahidi_action.report_add event. There you will have access to all the variables associated with an incident.