My sample widget:
class myWidget extends sfWidgetFormTextarea{
public function getJavascripts(){
return array('my_widget.js');
}
public function getStylesheets(){
return array('my_widget.css');
}
}
Form template:
<?php include_javascripts_for_form($form) ?>
<?php include_stylesheets_for_form($form) ?>
<?php echo $form;?>
The problem is that those 2 functions produce link
and script
tags right before rendering form.
How can I move them to the head
section?