Forums

Transparent-Blank Signature Pad Output

ITadminguy 24 May, 2024

So there is a ton of good news, and one piece of bad news.

I created a form with six signature_pads.   All of the signature pads work.  An image is created for each signature.  The debugger confirms that each signature was created, and all of the files are .png which are attached to the email output for the form.  The signature png files are also uploaded to the /chronoforms8/uploads/ disrectory.   The debugger salso shows an "array" with all of the signatures and the upload directory.

So far so good.

The only bad news is that there is no ink on the .jpg image.    It loooks to be either a tranparency or white space.  The signatures temselves are missing.  

One of the .jpg signature outputs is attached.

Has anybody enountered this?

Thanks in advance.

party-1-signature_20240524052637.png

signature no image


Max_admin 24 May, 2024

do you have any javascript errors on the page with the signature pad ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ITadminguy 25 May, 2024

I was able to get a single signature pad working.

I deleted signature pads 2 through 6, and with just one signature pad the signaute appears in the pnh file.

So it looks like multiple signature pads causes the problem.

I will try to experitment with other options to try to get mutiple signature pads to display png file output on the same form.  Maybe have an additional signature pad by creating page 2 on the form, another on page 3, etc.....   Worst case I can keep the one signature, and then create an "edit form" of the just completed form with the data all populated except the signature pad for another person to sign, and just do that as many times as is needed for all 6 persons that need to sign.   Rome was not built in a day, and neither does my trying to find solutions to problems like this.

***********

When I was trying to get all six signature outputs to show up (when none of them were), I was not sure where to look for javascript errors.  Whether I signed all six signature pages, or just the first one, the output ink was empty in the image(s). 

The form debugger said the email was sent, which it was.  The signature png file was in the uploards directory. 

I checked the joomla core administrator "log everything"and no javascript error there either.

I also checked the inspector on the form debutter output page for any javascript errors and I could not find any.   The form "warning" after hitting the submit button also did not display any errors.


ITadminguy 25 May, 2024

Also, one related question.  I recall we used to be able to save the signature as a Blob.  I set up a column in the datatable for Blob, I gave it a vlaue of 2222222 and a collation of ut8mb4_general_ci.   

The output in the table for the blob says  "[Blob 6.7kb]"    It open and there is a link to showing a file called "[the form name].signature-party-1.bin"   There is no image in the .bin file.

Perhaps I set up the Blob incorrectly in the datatable for this form?

Any help would be appreciated.

I will update if I find a way to use multiple signature pads in one form.

Thanks in advance

P.S.   Whenever I post in the Forum, my session usually times out and everything is lost.  I used to be able to hit copy and paste to notepad++ just in case the session timed out after about 5 or 10 min..  That way I would not lose what was just typed.   The right click is only showing a link button to select.   It is very difficult to right click to "copy" what I typed before replying.  You have to go outside of the text area box and it will sometimes work.

So now I just type my msgs and replies in the forum on notepad ++, and then paste them over so that there is no session time out.

Maybe the session in the form can be extended from thre 5 to 10 min. to perhaps 30 min..  Not a big deal, just noting the potential problem.

 


ITadminguy 25 May, 2024

Good news  The first problem is solved.

For multiple signature blocks in the same form, you need to only have one signature pad per form page.

I determined this because I tested two signature pads on the same page 1 of the form.  Only the second of the two signature pads displayed output.  The first was empty.

Check out the demo for multiple page forms.  All you have to do is add a page 2.  

On the top of page 2 copy your css file from page 1 if you want your buttons and signature pad css to look the same.

Then Create a back to prev. page button by changing "submit" to "prev page".

Then add a submit button at the bottom of page 2 under the prev page button.

Bingo.  Here is the output when I drew "1" on page 1 sig pad, and "2" on sig 2 pad.

Note that I left my db save and email in the Action for page 1.    There is nothing in the Action of page 2.  The form still processed.  You would think that the Action had to be on the last page, but it doesn't and the form still appears to work just fine.

Forgot to mention.    

The two blob columns in the datatable for the signature form, and the signature pads in the signature form - I named them "party-1-signature"  and "party-2-signature."

Assuming the form was very basic, you also have to put this in your data save action for the signature form.    Once the table matches the fields in the form, select the table name n the db save.  Put {data:}, put {data:} in Data Source, "id" in primary key if that is what you are using, type out all the table fields in table fields, and in the modify data source put something like the list below for a simple form where these are the only fields.  

Note this form is for already created and logged in users. (you need a DB read on the load event for id, user_id, username, name, and email from the joomla_user table.  

FYI - The remaining fields I put in my own extra profile fields table (firstname, lastname, suffix, and you can add any other fields in that extra profile fields table to create your own profiles for the users. I then had to crate my own profile menu and webpage to display the entire user profile, and my own edit profile page.    This is critical if you create extra forms to make sure that each extra form has a DB read of the Joomla user table, and a DB read of the extra profile fields - so that the latest user profile info gets called up and inserted into all other forms you create)

(The party-1-signature and party-2-signature fields plus all the other core joomla user core fields from the user table are all in the signature_form.)

This goes in your modify data source of the db save:

[FYI, these fields are from the user table]

id={data:id}

user_id={data:user_id}

username={data:username}

name={data:name}

email={data:email}

[FYI, these fields are from my extra profile table]

firstname={data:firstname}

lastname={data:lastname}

suffix={data:suffix}

[FYI, these fields are from this signature form only]

party-1-signature={data:party-1-signature}

party-2-signature={data:party-2-signature}

[FYI, all of the above fields are saved in the signature form and it's data table]

party-1-signature_20240525024824.png

sig 1

party-2-signature_20240525024834.png

sig 2


ITadminguy 25 May, 2024

More testing.   If you keep your submit and email actions in the Submit on Page 1, only the first sgnature attaches to the email.

If you move the submit and email actions to the Submit on Page 2, both signatures attach to the email.


You need to login to be able to post a reply.