|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
debasis Smarty n00b
Joined: 27 Jul 2003 Posts: 3
|
Posted: Sun Jul 27, 2003 11:50 am Post subject: Passing dynamic value to form elements |
|
|
How to pass dynamic value to template having form element? |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Sun Jul 27, 2003 1:37 pm Post subject: |
|
|
you mean[php:1:b5563a3aaf]<?php
$smarty->assign('form_value', $_GET['blah']);
?>[/php:1:b5563a3aaf]and Code: | <input type="text" name="blah" value="{$form_value}" /> | like that _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
debasis Smarty n00b
Joined: 27 Jul 2003 Posts: 3
|
Posted: Wed Jul 30, 2003 5:56 pm Post subject: |
|
|
Thank you very much . Now my problem is solved. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jul 30, 2003 7:19 pm Post subject: |
|
|
just additionally:
i made a habit of doing
Code: | <input type="text" name="blah" value="{$form_value|escape}" /> |
so the form even works when $form_value contains "<", ">" and "&"
greetings
messju |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|