The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Insert PHP
[resolved] Inserting dynamic text in a form button (2 posts)

  1. drosengarden
    Posted 2 years ago #

    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.



  2. WillBontrager
    Plugin Author

    Posted 2 years ago #

    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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Insert PHP
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic