Disabling a form. Button on one page, form on another

Based on this older thread concerning how to disable form elements:

It works like a charm.

However, the “disable” button is on the same page as the form. Is there a way the “disable” button can be on a different page than the form?

An example would be an admin page, where the administrator can “disable” the form on one of the site’s public pages.

Thank you!

Wow, that is such a brilliant & simple way to do this! Thank you so much.

Now I just have to beg my client to enable PHP on their server.


You could have your client sites include your own php page. Their link would involve using an id code for them, which you could correlate to their domain to ensure they don’t use someone elses. Once you authenticate them you give them code with a limited-use code, to limit the number of times that it can be used.

Your client would use:

include 'http://www.Moreinfo.com/moreinfo.php?auth=b0eR4cVYsc829WZLAP2P2sdlv535GFMmy4skdNa9rHgmG0yGc6B2DM0MtZU6CvJ';

Or they could do something similar with an iframe.

When you decode their auth string and confirm that it matches their domain (which helps to prevent sharing) you can then give them the form code for the button.

The form that you give them would then submit with a different auth code, which could be as simple as encoding their client number and a timestamp:

<form method="post" action="http://www.Moreinfo.com/client.php?auth=15X4NwEKw7QpV73xkMRhg4Clw8RaexrmBc6FkYzH3tzf1GjDGwDIjChqUdJ1Rxg">

On your side you decode the auth info and show their appropriate page.

You do not want them to be able to access their moreinfo page without going through your system, so you would store their page at a non-public location and then include it from your script when it is allowed.

I am not familiar with i-frames, but I will read up on it. I had thought they were like pop ups. But now i’m thinking it’s a way to include pages from another server.

Thank you from the other hemisphere!


Or to use an iframe :slight_smile:

The app i’m working on is a php app.

Do you know any examples out there I could take a look at?

The application is php/mysql based, and operates as a “plug in” for other websites. A “more info” button is placed on my customer’s website, which takes them to my site, which in turn provides content.

So I would like a disable feature on MY admin website, that could stop the displaying of the button on the customer’s site.

A “More information” button is placed on an external html website page, say external.com, as follows:
<form enctype=‘multipart/form-data’ action='http://www.MoreInfo.com/client1.php" method=‘POST’> <br></br> Show more info<br></br> <input type=‘hidden’ name=‘name’ value=‘PABullFrog’> <input type=‘IMAGE’ src=‘http://www.MoreInfo.com/InfoButton.jpg’ name=‘InfoButton’> </form>

But the external website is going to have a lot of these info “buttons” on their pages.

I would like a global button where the moreinfo.com website could somehow make the image button on the html site disabled, or invisible.

I could be reading into this too much. Could I somehow suppress the .gif image on my site from displaying on my clients site? Without making those ugly x’s associated with an empty <img src=“”>?

Thank you for your help.

There is, but it’s not practical to achieve only with javascript.

The standard solution to this requires storing button disable info in a database, and creating pages that only an admin is allowed to log in to, to change that info.

The pages that create the button (with PHP for example), would first check the database for the required status of that button, before showing it in its required state on the page.