Read PHP file instead of HTML file -...

User 2869370 Photo


Registered User
15 posts

The form builder creates a .html file, to which I then add php code to provide dynamic content. When I invoke the .php file at the root level of the directory tree, it presents the original .html file to the browser, rather than presenting my new .php file. Therefore, I have to configure the URL to my form to point to form_name/form_name.php, rather than to form_name.php (i.e., the php file at the root level of the directory tree). This causes other problems downstream, for example, if a user were to go back a page in their browser, they would invoke form_name.php (at the root level), which would then present the original .html file, rather than the modified file with the added .php. How can I, instead, direct the root level .php file to the modified file with the added .php?
User 122279 Photo


Senior Advisor
14,450 posts

The Form Builder wasn't made to work with custom PHP. Having said that, there may be ways to change that. Wait for a user named Eric...
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 187934 Photo


Senior Advisor
20,188 posts

Change your form name extension from myformname.html to myformname.php.
Then I think it was line 62 of the formpage.cls.php
Change this
$filename = $this->name . '.html';

to this
$filename = $this->name . '.php';

I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.