Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, March 29, 2024
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Display a MySql-Enumeration as Radio Buttons?

phpMyEdit Features     Display a MySql-Enumeration as Radio Buttons?
Post new topic   Reply to topic   Goto page 1, 2  Next  
 
rolloderwikinger     Joined: 16 Jun 2006   Posts: 6  
Post Posted: 2006-06-16 12:58
Back to top  Reply with quote     

hi, I have a MySQL field called 'gender' which is an enumeration of values 'male' and 'female'. Is there a chance to get these values displayed as radio buttons (two of them with a male and female label) when adding a new record? So far I always get a drop-down box with the two values. Thanks and regards Roland

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2006-06-16 13:14
Back to top  Reply with quote     

not by standard means.

you can hack the class

or use 'php' option http://opensource.platon.sk/projects/bug_view_advanced_page.php?f_bug_id=393
(let me know if you find it usefull) (which is just easier way of hacking the class)

 
rolloderwikinger     Joined: 16 Jun 2006   Posts: 6  
Post Posted: 2006-06-16 15:46
Back to top  Reply with quote     

Hi, wouldn't it be easyer to modify the code like:
...
if ($this->fdd[$k]['select'] == 'R') {
echo $this->htmlRadio($this->cgi['prefix']['data'].$this->fds[$k], $css_class_name,
$vals, $selected, $multiple, $readonly, $strip_tags, $escape);
}
else {
echo $this->htmlSelect($this->cgi['prefix']['data'].$this->fds[$k], $css_class_name,
$vals, $selected, $multiple, $readonly, $strip_tags, $escape);
}
} elseif (isset ($this->fdd[$k]['textarea'])) {

and then add a function
function htmlRadio($name, $css, $kv_array, $selected = null, /* ...) {{{ */
/* booleans: */ $multiple = false, $readonly = false, $strip_tags = false, $escape = true, $js = NULL)
{
$ret = '<input type=radio class="'.htmlspecialchars
...
and may be even support checkboxes this way by placing something like
if ($multiple) { $typeword='checkbox'; }
else $typeword='radio'
$ret = '<input type=' $typeword ' class="'.htmlspecialchars
Above codesniplet would introduce a new option for the select parameter of a field R which only is relevant if the field has values.
What do you think?
/Roland

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2006-06-16 17:21
Back to top  Reply with quote     

i would be a lot more happy to reduce the size of core class, putting options like this outside of core class. but this would require a lot of code rewriting and moving around (without a special effect).

so to sum up, can you use the php option. we will make a repository for these files.[/img]

 
rolloderwikinger     Joined: 16 Jun 2006   Posts: 6  
Post Posted: 2006-06-16 19:02
Back to top  Reply with quote     

Hi,
Yes, the include mechanism
...
} elseif ($this->col_has_php($k)) {
echo include($this->fdd[$k]['php']);
} else {...
certainly works as I have access to all variables also found in the calling "function".
I'll go for this solution.

 
wyguk     Joined: 21 May 2022   Posts: 1  
Post Posted: 2022-05-21 08:22
Back to top  Reply with quote     

The following query code of SQL will resolve your problem of Enumeration as Radio. If still you face any issues then you can select it on essaypro.com review where you can find more latest queries and its type that you can use.

 
kevinbond     Joined: 30 Mar 2022   Posts: 163  
Post Posted: 2022-05-27 06:50
Back to top  Reply with quote     

Hiring their team is the equivalent of hiring senior technical resources top website design agencies

 
fyzop     Joined: 16 Jun 2022   Posts: 1  
Post Posted: 2022-06-16 06:34
Back to top  Reply with quote     

Flossing is a fundamental piece of cleaning between your teeth. It is suggested that you floss no less than one time per day, prior to brushing. With ukHumm Dental of floss, fold the floss over your file or center fingers until there is around 5cm between your two hands.

 
tifetaxa     Joined: 16 Jun 2022   Posts: 1  
Post Posted: 2022-06-16 06:48
Back to top  Reply with quote     

I tell you accordingly, don't stress over your living what you are to eat or drink, or about lemon aoli your body, what you are to wear. Isn't the existence more significant than its sustenance and the body than its clothing.

 
mafagehy     Joined: 16 Jun 2022   Posts: 1  
Post Posted: 2022-06-16 07:15
Back to top  Reply with quote     

Think about these individuals your models. Concentrate on yourself in the mirror. How would you thoroughly search in the rest room, while hawley vs essix retainer shopping, and keeping in mind that passing an intelligent window.

 
zyrivysozo     Joined: 16 Jun 2022   Posts: 2  
Post Posted: 2022-06-16 08:08
Back to top  Reply with quote     

You will be exceptionally miserable and disheartened assuming you expect that your fiancee will be here inside half a month of documenting the request. Some business visa in uae Service Centers are quicker than other and a few unfamiliar offices are quicker than others. With the right blend of a quick USCIS.

 
LincolnMony     Joined: 16 Jun 2022   Posts: 1  
Post Posted: 2022-06-16 08:21
Back to top  Reply with quote     

Sirodhara Sira implies Head and Dhara implies the consistent progression of a fluid. In this cycle a few natural oils, sedated milk, cured margarine milk and so forth, are poured on the temple in aussiekiwitours an extraordinary strategy for around 40 minutes in a day for a time of 7 to 21 days. This treatment is chiefly for sleep deprivation, loss of.

 
cupobu     Joined: 16 Jun 2022   Posts: 1  
Post Posted: 2022-06-16 08:23
Back to top  Reply with quote     

Quick and dependable data is scant. Understanding out of the data is much more difficult to find. Large retail firms spend millions on statistical Agilus surveying of their own Products as well as those of their rivals also.

 
riletu     Joined: 16 Jun 2022   Posts: 1  
Post Posted: 2022-06-16 08:34
Back to top  Reply with quote     

As recently referenced, the Cairo Declaration is a layout of human rights inside the Islamic world which was embraced in August 1990 by the nineteenth Islamic Conference of Foreign Ministers of the anaklegal.com Organization of the Islamic Conference nations.

 
lewil     Joined: 16 Jun 2022   Posts: 1  
Post Posted: 2022-06-16 08:51
Back to top  Reply with quote     

In the event that you return exclusively for treatment for a physical issue or sickness caused while voyaging. End of Trip Home Country Coverage is www.summitcover.ca accessible as a choice on certain plans. The length of the extra inclusion depends on the length of inclusion initially bought.

 
Post new topic   Reply to topic   Goto page 1, 2  Next  

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy