Generated PHP appears to be incorrect

Issues related to forms.
Post Reply
User avatar
Magical
 
 
Posts: 111
Joined: Thu Dec 14, 2017 5:08 pm
Contact:

Generated PHP appears to be incorrect

Post by Magical »

Greetings,
Have a perplexing situation. I recently updated to the latest 15.4.1 and one of my form started failing on a generated php statement.

Failing Form HTML:
<input type="hidden" name="datesent" value="<?php echo date("m/d/Y"); ?>">

Generates following incorrect PHP:
<input type="hidden" name="datesent" value="<?php echo date(" <?>="" "="">

This is working - updated a couple of weeks ago.
Form HTML:
<input type="hidden" name="datesent" value="<?php echo date("m/d/Y"); ?>">

Generates following correct PHP:
<input type="hidden" name="datesent" value="<?php echo date("m/d/Y"); ?>">

I ended up changing the statement as follows to get it to work:
<input type="hidden" name="datesent" value="<?php echo date('m/d/Y'); ?>">
User avatar
Pablo
 
Posts: 23025
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Generated PHP appears to be incorrect

Post by Pablo »

Please make sure all HTML formatting (in Tools -> Options -> HTML) is set to default.
User avatar
Magical
 
 
Posts: 111
Joined: Thu Dec 14, 2017 5:08 pm
Contact:

Re: Generated PHP appears to be incorrect

Post by Magical »

I have not touch that but this is what it shows:

HTML ->Formatting -> Beautify
CSS -> Formatting -> Default
JavaScript->Formatting -> Default

Changed HTML Formatting to Default and it fixes the issue.

Thanks
Post Reply