I've added an "Images" tab to most of my pages, so that I can add an image that is also displayed in the Holder page enclosing it. I've done this in the following way:
Opening the page's .php file
Adding
static $has_one = array(
'Photo' => 'Image'
);
and
function getCMSFields($cms) {
$fields->addFieldToTab("Root.Content.Images", new ImageField('Photo'));
return $fields;
}
as described in the tutorials. Works perfectly :)
However, I've tried to do the same in UserDefinedForm.php. It initially seems to work, but when I try to upload the image (or select one from the File Store) and click "attach image", it displays "ERROR. The website server has not been able to respond to your request."
Any help gratefully received.
Thanks