Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    utilising $PORTAL_MESSAGE$ in a custom error HTML

    Scheduled Pinned Locked Moved Captive Portal
    3 Posts 2 Posters 612 Views
    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.
        Edit : and where are the logs ??

        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
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.