Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • vivek
  • vivek's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 123
  • Thank you received: 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.

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.056 seconds

I must say that I'm leaps and bounds ahead of where I would have other been with J2.5 with full thanks to the folks on this forum and specifically to Cook so you'll never hear me complaining.
gdpodesta (Forum)  

Get Started