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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

ImageField


Reply


2 Posts   684 Views

Avatar
nicanor

Community Member, 15 Posts

29 July 2011 at 3:31am

Since the last Post i know that not everything is out of the box with Silverfast. When i use ImageField in FE i got no input field. i just got the message: (german)

Bild kann angefügt werden, sobald Sie den Datensatz das erste Mal gespeichert haben.

means more or less

You can add the image after you stored the data record for the first time.

Makes sence, because there is no record ID at this time. But when i pass the data with session there has nothing changed.

[url=http://silverstripe.org/general-questions/show/17646#post306210]My Post about CRUD form[/url]

I read some post here about passing the id as third parameter, it was the only advice i found, but don't work

like this

ImageField( FIELDNAME, SHOWNFIELDNAME , ANDHEREID)

Does somebody know, how to use ImageField in FE forms?

i attached an image of that ImageField

Attached Files
Avatar
swaiba

Forum Moderator, 1799 Posts

29 July 2011 at 4:19am

For FrontEnd forms use SimpleImageField (core - http://api.silverstripe.org/2.4/forms/fields-files/SimpleImageField.html). Sometimes Uploadify (separate module - http://www.leftandmain.com/silverstripe-modules/2010/08/26/uploadify/)