Add a custom action within a RecordDialog

Skip to first unread message

Francisco Martinez

Jan 7, 2022, 9:54:06 AMJan 7
to Xataface

I am using the Calendar module to view the appointments for a clinic. 

When the module opens a RecordDialog form to edit an existing event (i.e. appointment) I would like to add a custom action (i.e. button) at the end of the RecordDialog form to open up a form to consult patient history for the shown appointment.

I tried adding an action to the table's actions.ini. 

The new action in the actions.ini  shows in the regular window, but I cannot make it to appear in the RecordDialog form that the calendar action opens when editing an event, I think the action is there but it is hidden in the header (which seems to be hidden by default by the recorddialog form).

I only get the SAVE button at the end of the form.  Anybody knows any way to add an additional button?

Thank you


Steve Hannah

Jan 7, 2022, 10:04:10 AMJan 7
I'd like to add easier support for adding additional "submit" buttons on forms via actions, but haven't had a chance to do this yet.

In the meantime the easiest thing might be to attach your action to a particular field on the form using the fields.ini "actions" directive, which maps to a category in your actions.ini file.






The key is that the value of the "actions" directive of the fields.ini file corresponds to the "category" directive in the actions.ini file.

This will render the "myaction" action as a button just below the "myfield" field.


You received this message because you are subscribed to the Google Groups "Xataface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Steve Hannah
Web Lite Solutions Corp.

Francisco Martinez

Jan 7, 2022, 10:33:15 AMJan 7
to Xataface
Fantastic solution thank you Steve, this works as I need.

One small thing, I read in another post the question if the url for the action can be triggered in a new tab of the browser, I did not find if this is possible

currently the URL in my action looks like below and it opens in the same RecordDialog window with limited actions
url="{$this->url('-action=list&-table=Treatments&-sort=TreatmentID+desc&-cursor=0&-skip=0&-limit=30&-edit=1&-mode=find&-edit=1&PatientID=' . $record->getValueAsString('PatientID'))}"

If not possible I will redesign the destination URL to work well within the RecordDialog, you have already helped a lot.

Thanks for such a wonderful tool and gift to us.


Steve Hannah

Jan 7, 2022, 10:46:04 AMJan 7
You should be able to do target="_blank" in the action definition to have it open in a new window.

Reply all
Reply to author
0 new messages