Welcome, Guest
Username: Password: Remember me

TOPIC: How to specify a default image for image fields

How to specify a default image for image fields 12 Oct 2013 04:27 #11374

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 2
Hi,
How to specify a default image for image fields.If the user doesn't upload a video, I would like to show a default image.

For Example : User Avatar.
The administrator has disabled public write access.

How to specify a default image for image fields 20 Nov 2013 16:14 #11691

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
I moved in new functionalities, because it could be awesome.

But still if somebody has an idea about it can post here an answer.

For my part, I would say a simple normal default string pointing to a valid image path.
Is it a stupid question ? or a stupid answer ?
Maybe I did not got it...

I think you can also test it in sandbox :
1. Make an upload of your default image in your component (play with the rename property to name it as your please)
2. You can delete the item that you have used for that upload, but be careful it does not delete the image. (must unckeck this option in the image field type)
3. Enter your image path in the default value of the image field in the builder. (you can also try 'prefills form')
4, That's all.
It uses indirect files accesses ex : [DIR_XXXX_XXXX]/default.png
It uses the thumb engine.

Try it... It should work.
Coding is now a piece of cake
The administrator has disabled public write access.

How to specify a default image for image fields 20 Nov 2013 16:17 #11692

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Also...

if you want to read the path of your image, instance the image in the grid or in a fly, and uncheck 'preview'.
It will return the indirect image path that you will enter as default value of your field.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.095 seconds

Get Started