0

enter image description here

How can I add a custom field (stored as a field in Drupal db) under Manage
Events page ,which will be displayed as dropdown.
Event Status with values Pending or Approved.

How can I alter the filters added as seen in the image?

3

I would create replica of Manage event using Drupal views with same columns and filters as of Manage event screen.

If you still want to use the same screen then use pageRun hook to manipulate results by generating query and creating results and assigning to template

$page->assign('rows', $manageEvent);

Cheers

Pradeep

  • But I want to have all the links Configure, Participants, etc present in event items and also want to have it on the Manage Events Page, is it not preferable to 1) add a custom select list above 2) alter query ? – harshal Jan 28 at 16:46
  • 1
    Updated my answer – Pradeep Nayak Jan 28 at 17:29
  • Hi @Pradeep, thanks for your invaluable help,but my main question is how I can add custom filter, would request you to provide a link or suitable answer for the same. – harshal Jan 29 at 5:08
  • Hi for #2 in the above comment , I have added new question here: civicrm.stackexchange.com/questions/28248/… – harshal Jan 29 at 5:09
2

Use buildform hook provided by civi in order to add a custom input field on the form. Use this field as a filter eg Event Status.

From the value that is posted from this form($_POST['event_status']) - filter the result as mentioned by Pradeep using pageRun hook

  • Hi, Thanks a lot!, I used $form->addElement to create custom input field and was succesful, but having some issues altering $row in hook_pageRun based on event_status value. – harshal Jan 30 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.