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.

Archive /

Our old forums are still available as a read-only archive.

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

push FileIFrameField


Go to End


4 Posts   1436 Views

Avatar
Blackdog

Community Member, 156 Posts

9 August 2008 at 4:20pm

Edited: 09/08/2008 4:39pm

Any idea why FileIFrameField would fail in SS 2.2.2 within the following?

class Track extends DataObject {
	
	static $db = array(
		'Band' => 'Varchar(255)',
		'TrackTitle' => 'Varchar(255)'
	);
	
	static $has_one = array(
		'MySongs' => 'Songs',
		'FileName' => 'File'
	);
		
	function getCMSFields_forPopup() {
		$fields = new FieldSet();
		$fields->push( new TextField( 'Band', 'Band Name' ) );
		$fields->push( new TextField( 'TrackTitle', 'Track Title' ) );
		$fields->push( new FileIFrameField( 'FileName', 'File' ) );
		return $fields;
	}
}

Avatar
Blackdog

Community Member, 156 Posts

9 August 2008 at 5:36pm

ok I changed FileIFrameField to ImageField and kept the TrackTitle type as File and it works fine.

I can only assume the problem lays with FileIFrameField when it is within the popup.

cheers.

Avatar
Sean

Forum Moderator, 922 Posts

9 August 2008 at 6:43pm

I suspect you're right - the popup already has an iframe, so an iframe included inside one just sounds like madness. xD

Avatar
Blackdog

Community Member, 156 Posts

9 August 2008 at 7:09pm

yeah, so it would help if FileField was handled the same in a IFrame is ImageField is.

regardless, I can finish this project!!!