Jump to content

Images in HelperList and HelperForm


kalle@makewebo

Recommended Posts

Hi!

 

I need some help understanding how I can use images with HelperList and Helperform. Since the documentation is well simply put shit and googling haven't yielded anything, So I have a couple of questions.

 

First with HelperList and displaying an image:

1. Can I choose a different img path? As I understand it the folder needs to be in the img. I would like to put all my images in my module if possible.

2. How can I chose different image types? As I got it to work now I have to tell it to find a .jpg. But I want it to find both a .jpg and a .png. All image names are unique but the file type could differ.

 

Questions for HelperForm:

3. Unless question 2 only can have one filetype. How can I restrict a HelperForm to only make it possible to upload one filetype. <input> got the attribute accept, how can this be used?

4. How can I preview an image? I have seen the value 'display_image' in other answers (which isn't even mention in the docs...), but it doesn't work at all or I'm missing something.

 

So if someone could shed some light, I would really appreciate it :) 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...