Skip to main content

Hello,

 

I am new to K2 SmartForms. I am in the process of converting our automated forms and workflows to K2. On one of our forms we capture an image of the user’s signature from a folder on a drive. Basically we collected signatures from certain users and saved them as an image. When the user opens the form for approval their signature appears on the form based on their employee ID. Can we accomplish the same process in K2?

 

See attachment for example.

 

Thanks,

Bones

 


16963i16B6BFD76C217A8D.jpg

Bones,


 


There might be a couple ways to do this.  One would be to create an Active Directory custom attribute that points at a web page that associates a signature with a user (http://aryannava.com/2011/07/04/adding-custom-attributes-to-active-directory-user-profile/).  So when you created a new user, you could generate their signature as well and add that to the metadata of their AD profile.  


 


If you understand creating a webservice, K2 is capabile of wrapping a smartobject around that.


 


Another way would be to create a digital signature SmartObject associating the username with their signature.  If you go into K2 Designer and create a simple smartobject, you can accomplish this by adding in three properties (ID, Username, Signature).  You can load the smartobject in with signture data tieing it in with your companies usernames.  Then when a form is rendered, you can test to see if they have a signature and load it in if it exists.
12408i4AD11AE5BCE27961.png


Hi David,

 

We used your method of creating a SmartObject that contains the user's employee ID as well as the file path of where their signature image is stored. Everything worked but the SmartObject uses the image attachment control. There are a couple problems with this control. If the control in enabled the user can save the image and if the control is disabled the signature changes from black to gray. We would like the control to be disabled and the image to remain black. Is there a way to achieve this?

 

Thanks,
Bones


I would avoid disable and go with a read only flag.


 


I would try to work something in under a condition that if image exists set the control properties of your image attachmanet to readonly.


 


15337iBB78A60E59C3C58C.png


 


The image control on the right is under a read only state.  It looks like it will work better for your situation:


11004i32A3A61A7B72D4F4.png


 


Hi David,

 

I tried setting the control's property to read only and I am still able to click on the image and it asks if I want to save or open. I don't not want the user to be able to save these images. Any other suggestions?

 

Thanks,

Bones


Let me do some reasearch for you.  Sounds like you need the function of disabled and the look/feel of not-disabled.


That's exactly what we need. Thanks David!


Bones,


 


It looks like to get the behavior your looking for, you'll have to either create a custom control or put some javascript in the solution to prevent the control from being clicked on.  Both are fairly advanced.  The faded apparence of the control when disabled is part of the properties of all of our control sets.  I can't seem to find a way around it.   I'm wondering if there might be an alternate way by using another control like content management...I'll keep playing with this one.


To add to this discussion,

 

In general, for an image hosted on the web, it is possible to make the original image file difficult to download, but not impossible.

 

Javascript to disable right click functionality can be defeated using the developer console, and even through several browser add ons.  One could also simply screenshot the image in question as well if it is displayed on the page.

 

What I might suggest, is a slightly different approach to securing the images.  Hide the "real" image from the user entirley, and display a watermarked version to the user instead.  This would require a store of usernames, "real" images, and watermarked images, but would provide a way to meet the requirement of having the user validate they are attaching the correct signature, while preventing a user from downloading the real image.

 

Hope it helps,

 

Mike


Hi David and Mike,

 

Thank you for all your suggestions. We decided to create a custom control which is fulfulling our requirements. 

 

Thanks for your help,

Bones


Reply