In my form, I would like to allow users to add a weblink to an image (instead of uploading the image) so that views etc. will display the image from link. Is that possible -and if yes, how? Thanks in advance for hints
You will need to render it yourself... by using img tags as HTML
See https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions renderAsHtml
Assuming the field to store the link is called "link".. then the dirty way to show this as an image is something like
link.prepend(<img src=").append("/>).renderAsHtml
(put this into the ConfiForms Field macro's field name parameter)
A lot more flexibility you have when using PlainView and constructing your custom output HTML manually
Alex
Works, perfect- thanks Alex
I have a situation similar to this, but I guess I'm missing something important, since the solution did not work.
I'm trying to import .csv file into a comfiform. There are urls to pics that I would like to show as images. I've tried to set the corresponding item to file/attachment, link, html et al, show the confiform in tableview and used the solution from Alex in the field definition in the tableview. However, the url either shows as text, or a small icon for pics, but never show up as images.
May I ask what's the proper filed type to use in the confiform and what viewing option is compatible with this method?
Thanks.
Hi
You can use "link" or "text" field
If you use link field type then it will be rendered for you as link - nothing else is necessary, but if you decide to use the "text" field type then in the view (TableView, for example) and then placing a ConfiForms Field macro you can then use the asLink virtual function
Quick demo: http://recordit.co/ByRv4iq3v0
It looks like you're new here. Sign in or register to get started.