custom php script on a 'new record' page

A place for users and developers of the Xataface to discuss and receive support.

custom php script on a 'new record' page

Postby xenajo » Mon Jul 18, 2011 8:10 am

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: )
xenajo
 
Posts: 6
Joined: Thu May 19, 2011 6:16 am

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

Postby xenajo » Mon Jul 18, 2011 3:09 pm

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 ...
xenajo
 
Posts: 6
Joined: Thu May 19, 2011 6:16 am

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

Postby shannah » Tue Jul 19, 2011 10:38 am

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 21 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved