User Login    
 + Register
  • Main navigation
Login
Username:

Password:


Lost Password?

Register now!
Documentation
Who's Online
90 user(s) are online (10 user(s) are browsing XoopsWiki)

Members: 4
Guests: 86

bravo, trabis, Nick_James, lapsa2000, more...
[Main Page]

Dev:XoopsFormCheckBox

From XOOPS Project

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy
Category: Development

// Display checkbox, initially checked. $checked_value = 1; $checkbox1 = new XoopsFormCheckBox(, 'box1', $checked_value); $checkbox1->addOption($checked_value, _MD_MODNAME_CHECK_ME); $form->addElement($checkbox1);

// Display checkbox, initially unchecked. $checked_value = 1; $checkbox2 = new XoopsFormCheckBox(, 'box2', !$checked_value); $checkbox2->addOption($checked_value, _MD_MODNAME_CHECK_ME); $form->addElement($checkbox2);

Assuming the form's method is POST:

If box 1 is checked, the submitted form will have $_POST['box1'] = 1. Otherwise $_POST['box1'] will be undefined.

If box 2 is checked, the submitted form will have $_POST['box2'] = 1. Otherwise $_POST['box2'] will be undefined.

Retrieved from "http://www.xoops.org/modules/mediawiki/index.php/Dev:XoopsFormCheckBox"

This page has been accessed 411 times. This page was last modified 02:01, 16 December 2007. Content is available under XOOPS Project.


Local Support Sites
Powered by
XOOPS Code hosted on SourceForge

Powered by PHP



Powered by MySQL

Powered by Smarty

OSI certified

All content on this site is subject to the Creative Commons License
Developers for Hire