Hi everyone. I'm trying to understand how to set textfield values from php.
Seems to be a pretty simple task but I'm stuck:
I have 3 fields: "nome", "cognome" and "importo".
I put this script in the onLoad section under the "Setup" tab, before the HTML render form action:
But nothing changes.
It is just a test because my goal is to process a querystring value and then put it into a hidden field.
Any help?
Seems to be a pretty simple task but I'm stuck:
I have 3 fields: "nome", "cognome" and "importo".
I put this script in the onLoad section under the "Setup" tab, before the HTML render form action:
<?php
$form->data['cognome'] = "---";
?>
But nothing changes.
It is just a test because my goal is to process a querystring value and then put it into a hidden field.
Any help?
Hi aiken3000,
I would expect that to work OK.
You don't need to parse the query string, ChronoForms does that automatically, If there is a cognome=xxx in the query string used to load the form and you have an input named cognome then the value should be set for you.
Bob
I would expect that to work OK.
You don't need to parse the query string, ChronoForms does that automatically, If there is a cognome=xxx in the query string used to load the form and you have an input named cognome then the value should be set for you.
Bob
Hi, thanks for your reply.
The parameter is the id of a database row, I need to retrieve a text from the db based on the id and then print it to a field value.
I tried with a hidden field and it works, only with normal textfields nothing happens.
The parameter is the id of a database row, I need to retrieve a text from the db based on the id and then print it to a field value.
I tried with a hidden field and it works, only with normal textfields nothing happens.
This topic is locked and no more replies can be posted.