Page 1 of 1

custom php script on a 'new record' page

PostPosted: Mon Jul 18, 2011 8:10 am
by xenajo
Hello,

I need to execute a custom php script after a 'new record' page is displayed, to perform a specific query in order to transmit datas to a javascript function called on a widget:atts:onchange event

is there a php file on the table directory which could be modified or added to be executed after building the 'new record' page ?

thanks for your help

(always surprised by the power of Xataface ! :roll: )

Re: custom php script on a 'new record' page

PostPosted: Mon Jul 18, 2011 3:09 pm
by xenajo
Hi,

I think I found a reply at http://xataface.com/wiki/block__blockname :

I will use 'after_new_record_form' function in the delegate class of the concerned table

tomorow is another day, I will try this !

if somebody could confirm me it's the right way ...

Re: custom php script on a 'new record' page

PostPosted: Tue Jul 19, 2011 10:38 am
by shannah
That block is a fine choice. Note that you can implement blocks before or after any of the widgets on the form using the block__before_fieldname_widget() and block__after_fieldname_widget() methods (where fieldname is the name of the field).

Set debug=1 in the conf.ini file to see a readout of all of the available blocks and slots in your UI.

_Steve