Problem with PHP if when using ValidatedField data?
I have an UPDATE form that displays content if a value from the recordset, for the row that's being updated, is a certain numeric value:
<?php if ($rsEDITNEWS->getColumnVal("NJnewsFILE1TYPE") == 1) { ?>
<i class="fa fa-file-pdf-o fa-3x pull-left" aria-hidden="true" style="margin: 0 10px 10px 0;"></i>
<?php } ?>
This works fine upon initial opening of the update page but when the form is submitted and it fails WA Server validation the content is no longer displayed.
So I tried changing it to this, assuming that I'd need to check the ValidatedField data because it was being submitted and then failing:
<?php if (isset($_GET['enewsval'])?ValidatedField("editnews_784","newsFILE1TYPE"):$rsEDITNEWS->getColumnVal("NJnewsFILE1TYPE") == 1) { ?>
<i class="fa fa-file-pdf-o fa-3x pull-left" aria-hidden="true" style="margin: 0 10px 10px 0;"></i>
<?php } ?>
"newsFILE1TYPE" is the name of the form field that is being submitted.
Why isn't this working and/or what am I doing wrong?
Thank you,
NJ