Support » Plugin: Insert PHP » Inserting dynamic text in a form button

  • Resolved drosengarden


    Hi – can this be done?

    <p span style=”padding: 10px 0 50px 40px;”><input type=”submit” name=”sendbutton” id=”myButton” class=”myButton” value=[insert_php] if ($_GET[‘kw’])
    {echo ucwords($_GET[‘kw’]);}
    {echo ucwords(‘Default Text’);}

    I’m getting the button that shows the text [insert_php} so apparently the code is not running.

    I know the code works on my site as I’ve entered this into a page.

    I might also add that above code is being run in a TEXT widget.


Viewing 1 replies (of 1 total)
  • Plugin Author WillBontrager


    drosengarden, Insert PHP will work only in posts and pages.

    Sorry, but it won’t work in the Text widget.

    Otherwise, yes, your code appears that it would work (although I haven’t tested it). Try it in a post or page.


Viewing 1 replies (of 1 total)
  • The topic ‘Inserting dynamic text in a form button’ is closed to new replies.