I am trying to autofill form input data if it is set.
Unfortunately, it looks like my if statement is not working at all. I mean it doesn't show anything, no matter if its true or false.
<input type="text" value="<?php (isset($formData->fname)) ? 'ok' : 'error'; ?>" name="fname">
The value always looks like this:

I was also trying this way but it isn't working:
<?php (isset($formData->fname)) ? echo 'ok'; : echo 'error'; ?>
What am I doing wrong?
you've missed echo -))
<?php echo (isset($formData->fname)) ? 'ok' : 'error'; ?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With