Here is my scenario:
I have a Image field where users enter a Picture.
How I can lock the image field after entering the picture having before locking a alert message like:
"Image field will be lock. Are you sure is the correct picture?"
Also any suggestion how to unlock only the Image field of the form?
Thanks for your help
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
The locking and unlocking of objects is achieved using .access.
imageField1.access = "readOnly"; // locked
imagefield1.access = "open"; // unlocked
Now the imageField has the inbuilt clickability for adding images to the object. You could try the following in the click event of the imageField, but you may need to move it around to a different event - it just depends on when the image is loaded.
var nButton = app.alert({
cMsg: "Warning: You are about to lock this image. \n\nAre you sure that this is the correct image?",
cTitle: "Uploading images",
nIcon: 1, nType: 2
});
if (nButton == 4)
{
this.access = "readOnly";
}
else
{
this.access = "open";
}
The response from the app.alert is assigned to the nButton variable and then the if statement is checking which button the user selected in the dialogue - 'Yes' or 'No'.
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
The locking and unlocking of objects is achieved using .access.
imageField1.access = "readOnly"; // locked
imagefield1.access = "open"; // unlocked
Now the imageField has the inbuilt clickability for adding images to the object. You could try the following in the click event of the imageField, but you may need to move it around to a different event - it just depends on when the image is loaded.
var nButton = app.alert({
cMsg: "Warning: You are about to lock this image. \n\nAre you sure that this is the correct image?",
cTitle: "Uploading images",
nIcon: 1, nType: 2
});
if (nButton == 4)
{
this.access = "readOnly";
}
else
{
this.access = "open";
}
The response from the app.alert is assigned to the nButton variable and then the if statement is checking which button the user selected in the dialogue - 'Yes' or 'No'.
Hope that helps,
Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies