Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author ovann86

    (@ovann86)

    Hey,

    Not at the moment but it’s something I’ve been thinking about implementing – just haven’t got around to it yet.

    I’m still thinking through how it should work, so if you have any suggestions please feel free to share.

    For example

    • do the ‘next’, ‘previous’ and ‘submit’ buttons change their labels when an upload is in progress, e.g. ‘Upload in progress – please wait’.
    • what should happen if they click on the buttons when an upload is happening – should nothing happen or should they see an JavaScript alert window telling them ‘Upload in progress – please wait.’
    • by default in Gravity Forms, when you hit ‘enter’ on the keyboard in a stanard input field the form will submit (next page or submit) – what should happen in this circumstance? Should nothing happen or an alert?

    Have you seen an example where this has been implemented? If you know of one we can just imitate what it does.

    Thread Starter rdanamcd

    (@rdanamcd)

    You have a nice visual progress bar, so if can change the button title to simple “Uploading…” along with the existing progress bar would be nice.

    I would guess nothing happens if they click on the button or hit ‘enter’.

    I have seen where the buttons disappear completely until progress finishes… that would probably be the easiest but disabling would be nicer if possible.

    Thanks!
    Dana

    Thread Starter rdanamcd

    (@rdanamcd)

    I see renaming the buttons to “Uploading” when uploading. Thanks!

    One other issue though. I changed the name from standard “Submit” to something else. Are you able to capture what the button name was previously and then put it back after uploading?

    I was still able to click on the buttons, nothing happened which is good, but the spinning circle gravity forms uses shows up and then stays there spinning. Anyway to hide that?

    Thanks!
    Dana

    Plugin Author ovann86

    (@ovann86)

    Ah yes – I had that thought as I wrote ‘submit’ but didn’t get as far as setting it up.

    I probably won’t have time to work on this plugin for a few weeks, but in the meanwhile you could try a custom function to translate the string for this plugin.

    for example

    add_filter( 'gettext', 'itsg_gfau_change_submut', 20, 3 );
    
    function itsg_gfau_change_submut( $translated_text, $text, $domain ) {
        if ( is_singular() && 'ajax-upload-for-gravity-forms' == $domain ) {
            switch ( $translated_text ) {
                case 'Submit' :
                    $translated_text = 'Submit your form!';
                    break;
            }
        }
        return $translated_text;
    
    }
    Thread Starter rdanamcd

    (@rdanamcd)

    Okay great.

    Thanks

    Plugin Author ovann86

    (@ovann86)

    Hey again,

    I should have this sorted properly in the next version.

    Thread Starter rdanamcd

    (@rdanamcd)

    Looks great! Thanks

    Double check on line 638 gravity-forms-ajax-upload.php think it should be ‘.gform_previous_button’

    Thanks
    Dana

    Plugin Author ovann86

    (@ovann86)

    Good spot – thanks.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Disable gform buttons while uploading?’ is closed to new replies.