Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Behaviour.register : Form Initialize called twice


Go to End


1497 Views

Avatar
ccordina

Community Member, 2 Posts

13 February 2014 at 5:18am

I am running Silverstripe 2.4 and i'm having an issue with this :

Behaviour.register({
'#Form_EditForm' : {
initialize : function() {
....

When i click save & publish or save the initialize is running twice... can anybody suggest any possible solution to this problem?

The js is included in a separate file and being included using Requirements::javascriptTemplate and its only being included once...

Any ideas??