PG replaces complete content after inserting JS for form?

After I insert JS code for a form (made with CC Formbuilder) together with an iframe (between “noscript” tags) and save the page I get the following phenomenon:

The whole(!) content of the page is deleted and replaced by the php code used by the JS.
(I know of a message popping up when opening the page where PG warns about php editing etc.)
Why can’t PG just leave the code alone? Like in my Espresso app that I use for css and site management?
Anyway, I need a way to insert this without destroying the page. :sweat_smile:
Any ideas?

Thanks a lot in advance.
Pinegreetings,
Piro

I to have had this issue when I insert a form created in Coffee Cup Form Builder and have found no fix. The guys from PG @matjaz and @emmanuel.a have looked at this but I did not get a definitive answer.

My work around is basic but works for me - create the page in PG and create a place holder for the form - save a copy to use later as a template if you need to edit.

Close the page in PG and in Atom - insert your form code or script and save - do not open that page in PG again (which is why you have the saved copy so you don’t have to recreate the page if the html gets wiped).

When you open in a browser you will see the page but not necessarily the form just some script in its place but when you go live if your code is correct it should appear ok.

I would like a fix for this myself as what I have described is a pain in the butt so maybe in PG V3 it will work

Have also been in touch with Coffee Cup and they concluded that it was a PG issue not a CC problem

Thanks for your reply.
Good to know and I join hopes for V3 to solve this.
I used a different workaround:
—> renamed the whateverform.php file to something different. So the suspect PG can’t find the php file and desperately throws an error plus shows some weird stuff, BUT isn’t changing my code anymore. :slight_smile:
—> then on the server I put the whateverform.php with its right name.
Not a solution of course, but well … for me slightly more handy because I can just “work” in PG.

also a good work around