Thanks for reading my post ... When the user doesn't upload his product image during registration, the detail view in the read only grid should show a default image that i have in the
but it doesn't.
How should this be handled? insert default image everytime the user doesn't upload an image or show the default image using conditional style and set the css background image:
or maybe some other way (client side or server side?)
The way i have the upload image set up is through the Onblur event on a field in the form to save the detail view on blurr after all the required fields are validated, which only then shows the browse image button.
I am using the following: Image File Reference Field + MS SQL backend
The image upload pack is working fine and displays the uploaded images.
This is what i tried but didn't work:
- OnIntilialValueCalculate event:
'Didn't work!
- CanInsertRecord event:
'Didn't work!
- On the Image_ field i set the display setting conditional style to
with the following expression: IMAGE_=null_value() 'Didn't work!
- I also imported the image into the image directory of the project.
The perfect senario would be the following: when the browse image button is shown, the image_ field would already have the default image displayed in the form. In that case I would have to include an Ajax Callback after the onBlur event has been fired to update the record by inserting a default image into the table (in that case, does anyone know the sql to that for a reference image file)
Another simple senario would be to just display the default image when the image field is null.
What do you guys think?
Thanks
[PathAlias.ADB_Path]\Images\default_image.jpg
How should this be handled? insert default image everytime the user doesn't upload an image or show the default image using conditional style and set the css background image:
Code:
background-image: url([PathAlias.ADB_Path]\Images\default_image.jpg);
The way i have the upload image set up is through the Onblur event on a field in the form to save the detail view on blurr after all the required fields are validated, which only then shows the browse image button.
I am using the following: Image File Reference Field + MS SQL backend
The image upload pack is working fine and displays the uploaded images.
This is what i tried but didn't work:
- OnIntilialValueCalculate event:
Code:
e.newValues.IMAGE_=image_filename_encode("[PathAlias.ADB_Path]\Images\default_image.jpg")
- CanInsertRecord event:
Code:
DataSubmitted.IMAGE_=image_filename_encode("[PathAlias.ADB_Path]\Images\default_image.jpg")
- On the Image_ field i set the display setting conditional style to
Code:
background-image: url([PathAlias.ADB_Path]\Images\default_image.jpg);
- I also imported the image into the image directory of the project.
The perfect senario would be the following: when the browse image button is shown, the image_ field would already have the default image displayed in the form. In that case I would have to include an Ajax Callback after the onBlur event has been fired to update the record by inserting a default image into the table (in that case, does anyone know the sql to that for a reference image file)
Another simple senario would be to just display the default image when the image field is null.
What do you guys think?
Thanks