Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    utilising $PORTAL_MESSAGE$ in a custom error HTML

    Scheduled Pinned Locked Moved Captive Portal
    3 Posts 2 Posters 1.2k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jimmychoosshoes
      last edited by

      I have a very simple custom error HTML. The documentation states that errors can be sent to the error HTML and displayed with $PORTAL_MESSAGE$

      I am not a HTML coder, what line of HTML could I use to display the contents of variable $PORTAL_MESSAGE$?

      Whilst the documentation states this is primarily radius errors, it seems that voucher errors also use this variable. This will be ideal for me as I use voucher and radius.

      "Error message displayed for expired vouchers on captive portal error page ($PORTAL_MESSAGE$)."

      GertjanG 1 Reply Last reply
      Reply Quote 0
      • GertjanG
        Gertjan @jimmychoosshoes
        last edited by

        @jimmychoosshoes

        Check out the example :

        <form method="post" action="$PORTAL_ACTION$">
           <input name="auth_user" type="text">
           <input name="auth_pass" type="password">
           <input name="auth_voucher" type="text">
           <input name="redirurl" type="hidden" value="$PORTAL_REDIRURL$">
           <input name="zone" type="hidden" value="$PORTAL_ZONE$">
           <input name="accept" type="submit" value="Continue">
        </form>
        

        There is a leading $ and there is a terminating $.

        I'm using $PORTAL_MESSAGE$ on the error.html page :

        				<p style="color:red;"><b>$PORTAL_MESSAGE$.</b></p>
        

        No "help me" PM's please. Use the forum, the community will thank you.

        1 Reply Last reply
        Reply Quote 0
        • J
          jimmychoosshoes
          last edited by

          brilliant, thank you. I saw the example but couldn't find an example with the variable. Not having experience of this Im grateful for the help. I didn't realise it was literally simply put"$PORTAL_MESSAGE$" in the HTML!

          I thought it was going to be a php line or some javascript. That was the last thing I needed, captive portal going live...

          1 Reply Last reply
          Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
          Privacy Policy · Cookie Policy