Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Validate Signature Capture

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validate Signature Capture

    Hi All,

    I'd like to check that a signature has been entered before proceeding with the next step in my app. Using "{dialog.Object}.getValue('signaturecapture1');" gives the same result whether the signature has been entered or not.

    Any idea's how I can check that a signature has been entered?

    Thanks

  • #2
    Re: Validate Signature Capture

    Wow I can't imagine how that would ever be possible. You would be trying to compare a one image vs another. But maybe others have some ideas.
    B

    Comment


    • #3
      Re: Validate Signature Capture

      I just want to check if a signature has been entered, no comparisons between signatures required.

      Cheers

      Comment


      • #4
        Re: Validate Signature Capture

        Hi all,

        For anyone who might be interested Selwyn helped me out with this one. I resolved it by adding the following to dialogValidate

        if e.datasubmitted.SIGNATURECAPTURE1_HIDDENA5FN = null_value() then
        dialogValidate.hasError = .t.
        dialogValidate.errorText = "Please Sign Form"
        end if

        Comment


        • #5
          Re: Validate Signature Capture

          thanks Peter - big help I was stuck here for a while - cheers.

          I do have a related question I need help on that is currently beyond my meagre abilites...

          In my UX I have a button (Proceed) that submits my dialog (i.e. I use {dialog.Object}.submit(); statement in my Javascript event handler) that I use instead of using the defined Submit-Reset button (which I grew up on )

          My issue is this...

          After the {dialog.Object}.submit(); code I run a bunch of other javascript commands.

          I need to stop running the other commands after the {dialog.Object}.submit(); code if the dialogValidate.hasError = .t. (which it will be, if the signature field is empty).

          How do I do this?

          The dialogValidate.hasError = .t. is a server side xbasic value that gets triggered and then created by the {dialog.Object}.submit(); code which exists in the javascript on click event of the btn. Somehow I need an if statement back in the javascript that reads the dialogValidate.hasError = .t. value at the server and use this to ignore the rest of my javascript code (man this does my head in sometimes).

          help?

          Here is a snippet of my javascript code behind the proceed btn (for illustration purposes, I've left out the bulk of the JS but this demonstartes my issue)

          {dialog.Object}.submit();
          //I need to stop the following code from running if upon running the dialogValidate code (above in this post that Selwyn provided) I get a false return value
          var pObj = {dialog.Object}.getParentObject();
          pObj.runAction('VIEWSTAGINGPLACEMENT');

          At the moment I can use the code Selwyn provided (kindly posted by Peter) but the rest of my code still runs, in this case the runAction method opens a new UX and I need this not to happen, I need to stay at the current UX and force the sure to use the signature control.

          Appreciate any guidence...
          Last edited by [email protected]; 08-17-2014, 01:46 AM.

          Comment


          • #6
            Re: Validate Signature Capture

            Originally posted by [email protected] View Post
            My issue is this...

            After the {dialog.Object}.submit(); code I run a bunch of other javascript commands.

            I need to stop running the other commands after the {dialog.Object}.submit(); code if the dialogValidate.hasError = .t. (which it will be, if the signature field is empty).

            How do I do this?
            Assuming you're using the server side action script to save the data to the tables you can use events that are exposed in that action script. See the image for more info.

            2014-08-17_7-43-36.png
            Jim Coltz
            Alpha Custom Database Solutions, LLC
            A5CustomSolutions.com
            [email protected]

            Comment


            • #7
              Re: Validate Signature Capture

              You could try this... your numbers may vary but the general idea may work. (I just know I'm going to get some head shaking for this... but...).

              The length of a signture is quite large.

              An empty signature is 2518 bytes (this is a signature that did exist but has been cleared).

              An existing signature is 86 bytes.

              And finally, a signature that never existed is 59 bytes.

              So... no signature is going be either 2518 bytes or 59 bytes.

              In your code where you have your submit() try this...

              Code:
              var mySig = $('{dialog.ComponentName}.V.R1.SIG1').src.length;
              if (mySig == 2518 || mySig == 59){
              	A5.msgBox.show('Error','Please add a signature','o');
              	} else {
              	{dialog.object}.submit();
              	}

              Comment


              • #8
                Re: Validate Signature Capture

                thanks Jim and David....I'll update after I've tried your suggestions

                Comment


                • #9
                  Re: Validate Signature Capture

                  David have you learned anything new regarding this? I'm trying to make a disconnected app and validate with javascript. You code works well, however, the numbers are not the same. So I've put your numbers plus the other numbers and it works well.

                  Comment

                  Working...
                  X