Page 1 of 1

Generated PHP appears to be incorrect

Posted: Thu May 14, 2020 5:13 pm
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'); ?>">

Re: Generated PHP appears to be incorrect

Posted: Thu May 14, 2020 5:35 pm
by Pablo
Please make sure all HTML formatting (in Tools -> Options -> HTML) is set to default.

Re: Generated PHP appears to be incorrect

Posted: Thu May 14, 2020 5:40 pm
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