Brackets showing when no value

cy cyberrock 01 Nov, 2016
Hi Bob,
I am not to sure if this is a bug, or a feature or even if there is an on/off switch.

In some of my text inputs I require values brought in from the url (e.g ?pu=blahblahblah) so in the values i my {pu} to catch the values, which works well. Though. if there is no value in {pu} then it displayes the brackets and the text input name.

Can you please advise?

Thank you.
Ben
Gr GreyHead 02 Nov, 2016
Hi Ben,

You need to check if there is a value and set a default if there isn't one set. A Custom Code action with PHP like this should do what you need:
<?php
if ( empty($form->data['pu']) ) {
  $form->data['pu'] = '';
}
?>

Bob
This topic is locked and no more replies can be posted.