Fill field with variable with command in the theme file

Home Forums Quform WordPress Fill field with variable with command in the theme file

This topic is: resolved
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7790
    lucmercx
    Participant

    Today we use Quform to enable visitors to get an offer for one of our tours. I send the name of the page with a variable to the form. No problem as we have only one tour on a page at this moment. Example: http://english.originaltours.nl/beer-tour/

    What we would like to add is an inquiry from right form the page with all the tours (example: http://english.originaltours.nl/city-tour/). So we will add a button next to the “read more” button, only this one will activate a pop-up quform. How can I now include the name of the specific tour the visitor clicked on? In other words, fill a field on a form with the proper title?

    I’m familiar with the include in theme-file command but how can I include the
    <?php the_title() ?> in the following line so it will fill the right form field with the title from the tour?

    <?php if (function_exists('iphorm_popup')) echo iphorm_popup(5, 'Request an offer'); ?>

    Thanks very much in advance…

    #7806
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #9313
    lucmercx
    Participant

    Hello Ally,

    When I use this line the form will not “popup”. In fact it only returns to the top of the page.

    I used this line:
    <?php if (function_exists('iphorm_popup')) echo iphorm_popup(2, 'OFFERTE AANVRAGEN', 'tour=' . get_the_title()); ?>

    On this site: http://www.stadswandelingen-in-amsterdam.nl/type/wandel/

    I use it on the button “Offerte aanvragen” (request an offer).

    #9319
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #9332
    lucmercx
    Participant

    Dear Ally,

    Thanks for your reply, I have done the following:

    – update to 1.4.14
    – Placed the line:
    <?php if (function_exists('iphorm_popup')) echo iphorm_popup(2, 'OFFERTE AANVRAGEN', '','tour=' . get_the_title()); ?>
    No form will pop-up. If I add an empty variable in the line so the filling of variable tour is on the fourth position, it will work, only it shows on the form the title of the first event, no matter which button I use.
    <?php if (function_exists('iphorm_popup')) echo iphorm_popup(2, 'OFFERTE AANVRAGEN', '','tour=' . get_the_title()); ?>

    I have here the code used to generate the page with a list off all events:
    {foreach $posts as $item}
    {first}<ul class="items">{/first}
    <li class="item clear{ifset $item->packageClass} {$item->packageClass}{/ifset}{ifset $item->optionsDir['featured']} featured{/ifset}">
    {if $item->thumbnailDir}
    <div class="thumbnail">
    link}">thumbnailDir, w => 155, h => 115}" alt="{__ 'Item thumbnail'}">
    </div>
    {/if}
    <div class="description">
    <div class="desc-head">
    <h3>link}">{$item->title}
    <div class="item">min. <?php the_field('personen'); ?> personen | tijdsduur <?php the_field('tijdsduur'); ?></div>
    </h3>

    {if $item->rating}
    <div class="item-rating">
    {for $i = 1; $i <= $item->rating['max']; $i++}
    <div class="star{if $i <= $item->rating['val']} active{/if}"></div>
    {/for}
    </div>
    {/if}
    {var $lp = getTourPrice($item->id)}
    {if $lp}<div class="item-price"><span><span>{$lp}</span></span></div>{/if}
    </div>
    <div class="desc-text">
    link}">{!$item->excerpt}
    </div>
    <div>
    <div class="sc-button"">
    <span class="border"><span class="wrap"><span class="title"><?php if (function_exists('iphorm_popup')) echo iphorm_popup(2, 'OFFERTE AANVRAGEN', '','tour=' . get_the_title()); ?></span></span></span></div>
    <div class="sc-button">
    <span class="border"><span class="wrap"><span class="title">link}">LEES MEER</span></span></span></div>
    </div>
    </div>

    {last}{/last}
    {/foreach}

    I’ve stripped the code from inline styles.

    Thanks in advance…

    #9366
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #9399
    lucmercx
    Participant

    Thanks, this does the trick. The item van be closed now. Thank you very much for the good support!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy