473,463 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Smarty Checkbox not displaying in HTML

I am having problem displaying the contents of array into Smarty Checkbox in HTML

The details of array $people are:

$people = Array ( [1746524] => Allen Jamie [3118171] => Browning Andy [1246417] => Barrett Rich [4677613] => Chang Dongin [2962280] => Chupack Marla [1193259] => Dimmitt Holly [1828493] => Ezell Trevor L)

Expand|Select|Wrap|Line Numbers
  1.  
  2. PHP code:
  3.  
  4. foreach ($rawPeople->person as $p)
  5.   {      
  6.     $lastname = (string)$p->{'last-name'};
  7.     $firstname = (string)$p->{'first-name'};
  8.     $name = $lastname." ".$firstname;
  9.     $people[(int)(string)$p->id] = $name;
  10.   }
  11.  
  12. $smartyObj = new ConfigSmarty();
  13. $smartyObj->assign('mt',$people);
  14.  
  15.  
  16. HTML:
  17.  
  18. <tr><td>{html_checkboxes name='id' options=$mt
  19.             separator='<br />'} </td></tr>
  20.  

The checkbox just does not display at all.
May 30 '10 #1
4 2891
Atli
5,058 Expert 4TB
What does the HTML output look like, exactly?
And where do you call the display or fetch method on the Smarty object?
May 31 '10 #2
The html does not diaplay anything.

This is just a short snippet of the code , I have called the diaplay mehtod on the smaty object at the end.

Like this

Expand|Select|Wrap|Line Numbers
  1. $smartyObj = new ConfigSmarty();
  2. $smartyObj->assign('mt',$people);
  3. $smartyObj->display('ts3.html');
May 31 '10 #3
Atli
5,058 Expert 4TB
Ok. Why do you use a ConfigSmarty class, rather than the usual Smarty class? Is it a custom extension? Anything in there that could be affecting it in this way?

And do you have the error messages turned on? Any error messages would help finding potential bugs.
May 31 '10 #4
Yes configSmarty is the customized version which extends smarty.

And the other works just fine for radio buttons and drop down list.
I cannot see any error , just a blank html page.

I tried to print the contents of array $people. Which I uploaded in the previous post.
It is of the exact format needed in html_checkboxes.
May 31 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fuzzyman | last post by:
Does anyone know of an 'easy' way of displaying HTML from python - preferably using standard Tkinter widgets. I've heard that the 'Text' widget can be used to do this - but I don't fancy hand...
3
by: Mike Turco | last post by:
I have an Access database that holds a catalog and one of the fields contains the HTML for the web page. The HTML code is very simple. I would like to be able to display that HTML output on an...
2
by: Steve Barnett | last post by:
I have a desktop application that needs to display some summary information. At present I use the RichTextBox control but am unhappy with the results. What I would prefer to do is display an HTML...
5
by: Tomaz Koritnik | last post by:
Hi I have many short HTML files stored in a binary stream storage to display descriptions for various items in application. HTML would be display inside application using some .NET control or...
0
by: Anthony Harkness-Gripe | last post by:
This is a very simple XSLT, and I'm doing it ways that I've had work before, but it's not displaying HTML. Is there a flaw in my logic? C#:...
0
by: psid | last post by:
Displaying HTML/XHTML from source XML file i am having an xml file i want to display the contents of the xml file in a web browser control in winforms however i want to display it as...
0
by: ev45ive | last post by:
Hi! I have smth. like this: file.php: <?php SmartyValidate::connect($smarty); //SmartyValidate::register_form('register');
3
by: Doug (dtism) | last post by:
Hello **newbie alert** <-- that's me btw, but you might have guessed that by my topic title. I have an html page that submits a name and email address by a form to a page called preview.php ...
2
by: Arinté | last post by:
I have a webpage that I want to have a list of dates and on the right I want to show the blog info associated with that date. That blog could have some html info in it, what would be the best...
5
realin
by: realin | last post by:
hi guys this is very very simple and basic question.. i just cnat get it done . i want to align the checkbox in middle how do i do that .. here is the screenshot ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.