• Resolved farvgnugn

    (@farvgnugn)


    Matthew,
    Great plugin! I went ahead and bought pro yesterday.

    I have an issue pre-populating hidden fields and would like some help. (i just tried to piggy back the previous topic about this but it got resolved before I got a response so i’m posting again here):

    I return the default value in the hook just like for the rest of the fields (via form_id & field_id), but my output is the following:

    <input type=”hidden” name=”vfb-59″ id=”vfb-hidden-59″ value=”” class=”vfb-text “>

    Thanks for your help!

    https://www.ads-software.com/extend/plugins/visual-form-builder/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter farvgnugn

    (@farvgnugn)

    Hey Matt – I found the problem – the hidden field doesnt handle the default value at all. Here’s the modficiation – line 832 of form-output.php:

    before:

    case ‘custom’ :
    $val = trim( stripslashes( $opts_vals[1] ) );
    break;

    after:

    case ‘custom’ :
    if ( !empty( $default ) ) {
    $val = $default;
    } else {
    $val = trim( stripslashes( $opts_vals[1] ) );
    }
    break;

    Think you could add this to the next version?

    Plugin Author Matthew Muro

    (@mmuro)

    Yeah, shouldn’t be a problem to add that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Auto-populate Hidden fields’ is closed to new replies.