Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Search found 39 matches
Smarty Forum Index
Author Message
  Topic: Getting at a single result from a result array
ricklach

Replies: 0
Views: 3944

PostForum: General   Posted: Sat Apr 23, 2005 7:03 am   Subject: Getting at a single result from a result array
I pass the results of a query in an array page_data using pager. There is no problem getting the data out of the array using a foreach construct. However, can I get a single value from the array to ...
  Topic: repopulate html_select_date
ricklach

Replies: 2
Views: 5715

PostForum: General   Posted: Tue Feb 22, 2005 2:53 am   Subject: repopulate html_select_date
If my validation script fails I want to repopulate the form with the values that were submitted.. No javascript at this point.

Rick
  Topic: repopulate html_select_date
ricklach

Replies: 2
Views: 5715

PostForum: General   Posted: Thu Feb 17, 2005 11:21 pm   Subject: repopulate html_select_date
I have the following two lines of code:
{html_select_date prefix="start" time=$startDate start_year="-2" end_year="+5"}

{html_select_date prefix="end" time=$endDate start_year="-2" end_year="+5" d ...
  Topic: Smarty logic problem
ricklach

Replies: 6
Views: 18504

PostForum: Add-ons   Posted: Tue Feb 08, 2005 8:56 pm   Subject: Smarty logic problem
That did the trick. You can't imagine how long I looked at it only to miss the obvious. A second opinion is always in order. Thanks,

Rick
  Topic: Smarty logic problem
ricklach

Replies: 6
Views: 18504

PostForum: Add-ons   Posted: Tue Feb 08, 2005 4:20 pm   Subject: Smarty logic problem
Other than that, do you see any fault in the logic as presented. I discovered another bit of code that is exhibiting the same behaviour.

Rick
  Topic: Smarty logic problem
ricklach

Replies: 6
Views: 18504

PostForum: Add-ons   Posted: Tue Feb 08, 2005 3:27 pm   Subject: Smarty logic problem
It is after the else part. Are you saying that the statement $smarty->assign('bEvergreenDonation', false); is not required?

Rick
  Topic: Smarty logic problem
ricklach

Replies: 6
Views: 18504

PostForum: Add-ons   Posted: Tue Feb 08, 2005 4:41 am   Subject: Smarty logic problem
I have the following bit of code:
if($result->numRows() == 0) {
$smarty->assign('bEvergreenDonation', false);
} else {
while($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
...
  Topic: Using a For construct
ricklach

Replies: 1
Views: 10575

PostForum: Add-ons   Posted: Wed Jan 26, 2005 1:16 am   Subject: Using a For construct
using the for each function I cycle through an array to create a number of checkboxes in a table. I want to put five boxes in a row and then create a new row and continue to fill the row with five mo ...
  Topic: array and checkboxes
ricklach

Replies: 2
Views: 12222

PostForum: Add-ons   Posted: Tue Jan 25, 2005 1:16 am   Subject: array and checkboxes
Boots,

Thanks for that. I learned something new again today.

Rick
  Topic: array and checkboxes
ricklach

Replies: 2
Views: 12222

PostForum: Add-ons   Posted: Tue Jan 25, 2005 12:14 am   Subject: array and checkboxes
I have a $result array(associative) that is always a single row with a number and a series of "y" or "n" in the colums. How do I pass that array to a template - is it as simple as $smarty->assign ...
  Topic: $compile_dir ... does not exist
ricklach

Replies: 8
Views: 24569

PostForum: Add-ons   Posted: Thu Nov 18, 2004 4:50 pm   Subject: $compile_dir ... does not exist
Gentlemen,

As always, you advice has proved invaluable. My homework now is to read-up on singletons and try to implement that feature next. I solved all my other "file" problems with your suggest ...
  Topic: $compile_dir ... does not exist
ricklach

Replies: 8
Views: 24569

PostForum: Add-ons   Posted: Wed Nov 17, 2004 8:02 pm   Subject: $compile_dir ... does not exist
Monte,
I am using a full path name in my script. Been burned by that in the past and learned my lesson.

Boots,
What do you mean by "singleton" in your comment? Why not use a GLOBAL var if it is ...
  Topic: $compile_dir ... does not exist
ricklach

Replies: 8
Views: 24569

PostForum: Add-ons   Posted: Wed Nov 17, 2004 6:58 pm   Subject: $compile_dir ... does not exist
I am getting the following error for the first time: Smarty error: the $compile_dir 'templates_c' does not exist, or is not a directory.

Of course it is a directory because I have many compiled tem ...
  Topic: Smarty in a multi part form
ricklach

Replies: 0
Views: 8028

PostForum: Add-ons   Posted: Wed Nov 17, 2004 4:52 am   Subject: Smarty in a multi part form
I have to create several forms that have add, edit, view, search functions and take several steps to get to the completion of the form. The following example illustrates the point (I hope):
switch
...
  Topic: SmartyValidate - append
ricklach

Replies: 2
Views: 11918

PostForum: Add-ons   Posted: Tue Nov 16, 2004 7:21 pm   Subject: SmartyValidate - append
Monte,
Thanks for that input, I will make the changes. Regarding your last point about calling SmartyValidate::is_valid() - I do that in the next part of the form. The form is set up like this:
s ...
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP