• Resolved petefuseloft

    (@petefuseloft)


    Hi. This is outside of the normal functionality for this plugin, but I’m hoping you can suggest something.

    The situation:

    I have a page with a carousel, which displays data iterated from a 3rd party api using an ajax call. On the same template, I have a VFB form. I wrote some javascript to update one of the text fields’ value with data from the ajax request as the user advances the carousel.

    To inquire about a slide in the carousel, the user clicks a button which opens the VFB form in a modal, containing the pre-populated field.

    After the user submits the form, the confirmation message appears. Then the user can click out of the modal. The entry contains the data from the ajax request. All good so far.

    If the user then selects another item in the carousel and decides to inquire about it, they open the modal again, but the confirmation message is still present.

    I’d like to be able to reset the form from within a js callback function, after the modal closes, without forcing a full page refresh. Any suggestions? Is this possible?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Pete,
    This is a very interesting use and application of VFBPro. Because the form shortcode is in that space, I cannot think of a way to not show the confirmation message other than to CSS it out. Wanting another form to show would require a refresh. I cannot think of anyway around that at all, even using one of our hooks, you will still need a refresh. Sorry about that.

    Joseph
    VFBPro Support

    Thread Starter petefuseloft

    (@petefuseloft)

    Joseph,

    Thanks for the quick response! I thought that to be true, but figured I’d ask in case you had some ideas. Great plugin, at any rate. Cheers.

    -Pete

    For sure no problem ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘is it possible to reset form via javascript?’ is closed to new replies.