Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author David Wells

    (@davidwells)

    We have a baked in form tool: https://docs.inboundnow.com/guide/forms/

    You can use the markup from that form if you want to implement custom processing. Make sure the form has the correct tracking classes though

    Thread Starter RaymondTri

    (@raymondtri)

    Thank you for the quick response!

    If we wanted to pre-populate a form with fields from our database (say, if a user is logged in) what would be your suggestion?

    My thoughts would be to nest your form shortcode in a php file that is actually called in place of the simple shortcode. However, I don’t know where the code is coming from for each form, so I couldn’t just populate it with a php variable.

    Your thoughts?

    Thread Starter RaymondTri

    (@raymondtri)

    I mean, would (pseudocode):

    If (Is User logged in?) == 1 {
    Display form 1 with pre-populated field hidden, set default value as “<?php $wpdb->query (select xx from xx where xx is xx);”
    } else {
    Display for 2 with field shown
    }

    Work?

    Thread Starter RaymondTri

    (@raymondtri)

    Another theory that could work better, would be creating a custom form, and creating a $lead object out of it, and sending it in to the leads plugin.

    I’d hate to set up the API for just that purpose when it would be running on the same site.

    Do you have any material or an example about creating a leads object, and calling an add_to_leads function, with custom fields? That would be superb.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use with custom forms’ is closed to new replies.