Jump to content

ezIQchad

Caspio Guru
  • Content Count

    238
  • Joined

  • Last visited

  • Days Won

    32

ezIQchad last won the day on February 2 2017

ezIQchad had the most liked content!

6 Followers

About ezIQchad

  • Rank
    Advanced Member

Recent Profile Visitors

1,988 profile views
  1. Unsure, but I wonder if the authenticated DataPage has not had a chance to load yet so the test will always fail as it runs too early. Try an iframe deployment and run the check onload. <iframe name="dp_name" title="dp_name" src="https://123.caspio.com/dp/123">Sorry, but your browser does not support frames.</iframe> <script> var loggedInTestIfr = document.getElementsByName('dp_name')[0]; loggedInTestIfr.onload = function(){ checkLoggedIn(); }; function checkLoggedIn(){ var myTestElem = document.getElementById('loggedInTestDiv'); if (myTestElem == null) { //user not logged in console.log('Not logged in'); } else { //user logged in console.log('Logged in'); } } </script> What is the URL for you page? I'll take a look (if you also answer, or at least try to answer, the questions above)
  2. Hi,

    I am trying to create a Caspio submission form with multiple signature fields - all of which send the signature images to my table.

    I have tried the multiple signature code on the forum and it doesn't work - it is probably my understanding.

    Here is the code i have used:

    Header code:

    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="[@app:SignaturePad/]"></script>
    <div id="cb_sign_wrapper">

    Signature Fields (Hidden):

    Safety_comm_attendee_1_sig

    Safety_comm_attendee_2_sig

    etc

    HTML Block Code:

    <div class="sigPad">
        <div class="sig sigWrapper">
            <canvas class="pad" width="218" height="55" style="margin: 0px 0px 0px 100px;  border-style: solid; border-width: 1px; border-color: #bbbbbb #dbdfe6 #e3e9ef #e2e3ea; -webkit-border-radius: 1px; -moz-border-radius: 1px; -o-border-radius: 1px; border-radius: 1px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; background-color: #FFFFFF;"></canvas></br>
            <span style="margin: 0px 0px 0px 264px;">
                <input type="reset" class="clearButton" value="Clear">
            </span>
            <input type="hidden" name="output" class="output">
        </div>
    </div>

    Virtual1 Field (Hidden), Virtual2 Field (Hidden) etc

    Footer Code:

    <script type="text/javascript">
        $(document).ready(
            function ()
            {
                // TODO: Add your signature fields here in the order they appear on the form -->
                var signatureFields = [
                    ['Safety_comm_attendee_1_sig', [@field:Safety_comm_attendee_1_sig], 'cbParamVirtual1'],
                    ['Safety_comm_attendee_2_sig', [@field:Safety_comm_attendee_2_sig], 'cbParamVirtual2'],
                ];
                

                for (var i = 0; i < signatureFields.length; i++)
                {
                    var api = $($('#cb_sign_wrapper_edit .sigPad')).signaturePad({ drawOnly: true });
                    if (api)
                    {
                         api.regenerate(signatureFields[1]);
                    }
                }

                
                
                document.addEventListener('BeforeFormSubmit', function(event) {
                    for (var i = 0; i < signatureFields.length; i++)
                        {
                            // Dump signature JSON data into hidden signature field
                            var newSignature = $('#cb_sign_wrapper_edit .output').value;
                            if( $('#EditRecord' + signatureFields[0])[0]){
                                $('#EditRecord' + signatureFields[0])[0].value = newSignature;
                            }
                            if( $('#InsertRecord' + signatureFields[0])[0]){
                                $('#InsertRecord' + signatureFields[0])[0].value = newSignature;
                            }

                            // Capture each signature image into its corresponding [hidden] VIRTUAL field
                            var api = $($('#cb_sign_wrapper_edit .sigPad')).signaturePad({ drawOnly: true });
                            if (api)
                            {
                                api.regenerate(newSignature);
                                $('#' + signatureFields[2]).val(api.getSignatureImage());
                            }
                        }
                });

               
            }
        );
    </script>
    </div>
    <!-- Footer code end -->

     

    Regards

    Mark

  3. If you have updated your DataPages to use the subdomain for your account in the deploy code, the logout link now uses the account subdomain for your account. Rather than b5.caspio.com/folderlogout try ******.caspio.com/folderlogout where ****** is your Also, see: https://howto.caspio.com/deployment/caspio-site-vs-account-subdomain-deployment/ Hope this helps
  4. Chad did an amazing job helping us get the Auto Tab accurate. He was quick, professional and precise. He even helped us with a work around for our barcode scanning needs.

    1. ezIQchad

      ezIQchad

      Thanks Jay, It was a pleasure working with you.

  5. This behavior is displayed in many places my web-application. Create an account here Choose a free plan so you can log in to see this and other things Caspio
  6. Thanks Bruno, it was a pleasure working with you! I look forward to staying connected and seeing your project (great idea, I must say) grow and evolve!
  7. I do some Caspio and JavaScript freelance. I have thousands of hours of Caspio and JS experience, and can very likely build what you need. (basically full time since 2014) I am interested and able to help with small to medium sized projects. PM me for info. Some notable customers/projects include ezIQ.us QuoStudentTravel.com BaleDoneen.com Block-Trades.com MascotConstruction.com
  8. I want to see a list of available variables I can use here or there. What specifically brought me to this question were File Size error messages and a Date Format error messages that are vague and nondescript. I know I can change the wording, which helps, but I'd like to use the cool variables like "Are you sure you want to delete %n records" in the rest of my error messages. Does anybody know how to use these cool variables?
  9. Hello, I'm tying to improve my app's error messages using Localizations. I see on some error messages there are variables or parameters that provide the user with some very valuable information. Value cannot be shorter than %s characters. Value cannot be larger than %n characters. Are you sure you want to delete %n records. %p authorization failed. Cannot redirect to %p etc. Does anybody know how to use these, or where I can find a list of the variables we can use and how to? Thanks and ThinkEZ
  10. Thanks! Those are good options. I ended up using a workaround using ABSOLUTE. Substring([@field:ScratchPad], Charindex(': ',[@field:ScratchPad], Charindex('Passport Date of Issue: ',[@field:ScratchPad]) ) + 2, Abs( Charindex('===',[@field:ScratchPad], Charindex(': ',[@field:ScratchPad], Charindex('Passport Date of Issue: ',[@field:ScratchPad]) ) ) - Charindex(': ',[@field:ScratchPad], Charindex('Passport Date of Issue: ',[@field:ScratchPad]) ) - 2 ) )
  11. Hi, I'm stumped. This code works Substring([@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) + 2,Charindex(' ======',[@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad]))) - Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) + 2) This code breaks with only a minor adjustment: changing + to - at the very end Substring([@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) + 2,Charindex(' ======',[@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad]))) - Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) - 2) This code is a substring in example two that works until I add it to the code above Charindex(' ======',[@field:ScratchPad],Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad]))) - Charindex(': ',[@field:ScratchPad],Charindex('Departure Airport: ',[@field:ScratchPad])) - 2 Any help will be appreciated
  12. Hi,

    The purpose of a forum is to share the knowledge.

    If you have a question. Ask it on the forum. If you must, ask me to look at it and I will, but it must already be a question on the forum.

    Let's make sure we share the knowledge.

    CHAD

    1. TWIRED

      TWIRED

      That makes sense. 

       

      This question was posted but didnt get a reply so kinda got impatient

      Will do.

      Thanks~

  13. Hi @abelphathost, Thanks for the message, but let's not ask questions privately.... the point of a forum is for people to find that somebody else has already asked the same question. A couple things to note 1 - I've had trouble using JS and Caspio's checkboxes. Dropdowns are easier to work with. 2 - I never use 'onsubmit'. Rather i create a fake submit button that runs that code I need before the submit happens then wrap the function with: document.getElementById("Submit").click() ** If you must have something easier than a dropdown... This takes some work, but will allow you to do it. HTML block <style> #YOUR_FIELD_ID {display: none} .fake-radio { width: 120px; height: 50px; padding: 16px; margin: 16px 0 0 32px; font-size: 18px; float: left; } </style> <div class="fake-radio" onclick="document.getElementsByName('YOUR_FIELD_ID')[0].value = 'Yes';>Yes</div> <div class="fake-radio" onclick="document.getElementsByName('InsertRecordFieldName')[0].value = 'No';>No</div> YOUR_FIELD_ID 1. right click the field you want to populate > inspect 2. Look for <xx class="sample" id="XYZ_98sd7d" name="InsertRecordYOURFIELDNAME">Hi World</xx> 3. your answer is InsertRecordYOURFIELDNAME Try these suggestions and I'm sure you'll find your solution
×
×
  • Create New...