Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Passing dynamic value to form elements

 
Post new topic   Reply to topic    Smarty Forum Index -> Showcase
View previous topic :: View next topic  
Author Message
debasis
Smarty n00b


Joined: 27 Jul 2003
Posts: 3

PostPosted: Sun Jul 27, 2003 11:50 am    Post subject: Passing dynamic value to form elements Reply with quote

How to pass dynamic value to template having form element?
Back to top
View user's profile Send private message
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 236
Location: Purdue University

PostPosted: Sun Jul 27, 2003 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
debasis
Smarty n00b


Joined: 27 Jul 2003
Posts: 3

PostPosted: Wed Jul 30, 2003 5:56 pm    Post subject: Reply with quote

Razz
Thank you very much . Now my problem is solved.
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3335
Location: Oldenburg, Germany

PostPosted: Wed Jul 30, 2003 7:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Showcase All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP