Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Booleans and Format.

phpMyEdit General     Booleans and Format.
Post new topic   Reply to topic    
 
drum     Joined: 05 Nov 2006   Posts: 8  
Post Posted: 2006-11-05 00:29
Back to top  Reply with quote     

I've spent the afternoon playing with phpMyEdit, and I've figured out most of what I want to do, however I have a couple of queries.

Firstly is it possible to have boolean fields displayed as either Radio Button\Checkboxes??

Secondly if you've got a table with over 40 fields, is there an easy way of formation the fields, rather than having just one long list?

Thanks

Dave.

 
mac     Joined: 04 Nov 2006   Posts: 4  
Post Posted: 2006-11-05 04:33
Back to top  Reply with quote     

Hey Dave,

Playing around with this package, I had the exact same questions.

Here's what I've figued out so far. (hope this helps.)

As for the boolean fields, I used the following configuration options:

$opts['fdd']['is_male'] = array(

'select' => 'C',
'values2' => array('1' => ''),
'name' => 'Is male',
'maxlen' => 2,
'sort' => true
);

The trick is the values2 property. (the documentation has a good explanation of this property -- though I'm not sure I've figured out the best way to fix your issue.)

As for splitting up the pages, see the TABs section of the documentation. (Section 4.10): "This feature is for tables, which have more than a few fields. It enables you to group fields together into groups. Every group of fields then becomes accessible via TAB on the top or the bottom of the page, what is based on the ['navigation'] settings. TAB has its own label, which can describe fields in a particular group." It's a very slick feature.

Best,
Mac

 
ajh     Joined: 17 Dec 2003   Posts: 236  
Post Posted: 2006-11-05 09:30
Back to top  Reply with quote     

Unfortunately at this point PME doesn't do Checkboxes or radio boxes. Like to write an extension???

 
drum     Joined: 05 Nov 2006   Posts: 8  
Post Posted: 2006-11-05 10:04
Back to top  Reply with quote     

ajh wrote:
Unfortunately at this point PME doesn't do Checkboxes or radio boxes. Like to write an extension???


Setting select to 'C' would definitly appear to give me a check box.

 
drum     Joined: 05 Nov 2006   Posts: 8  
Post Posted: 2006-11-05 10:06
Back to top  Reply with quote     

Thanks Mac, both very helpful, the boolean thing is spot on. The tabs isn't exactly what I wanted, I was thinkinking columns seperators etc, but tabs are probably neater, and more slick.

Thanks

 
drum     Joined: 05 Nov 2006   Posts: 8  
Post Posted: 2006-11-05 14:10
Back to top  Reply with quote     

Anybody know how I can make the tabs into buttons rather than links??

 
mac     Joined: 04 Nov 2006   Posts: 4  
Post Posted: 2006-11-05 22:16
Back to top  Reply with quote     

hmmm.... i thought that could be switched around, but I can't remember how. If it were me I might mess with the CSS

it's possible to make a link look like a button:

http://forums.codecharge.com/posts.php?post_id=54141

 
ajh     Joined: 17 Dec 2003   Posts: 236  
Post Posted: 2006-11-06 12:31
Back to top  Reply with quote     

Hmm...well that serves me right for not reading the latest documentation. Radio boxes and checkboxes look as if they now are supported. That probably means that the mce_cal extension won't work with them.

If anyone fancies having a check of that and letting me know, I'd be grateful.

 
drum     Joined: 05 Nov 2006   Posts: 8  
Post Posted: 2006-11-12 22:30
Back to top  Reply with quote     

mac wrote:
hmmm.... i thought that could be switched around, but I can't remember how. If it were me I might mess with the CSS

it's possible to make a link look like a button:

http://forums.codecharge.com/posts.php?post_id=54141


I couldn't figure out the CSS stuff, so I've been playing with the source code. I've now got it to output

Code:
<td class="pme-tab" id="PME_dhtml_tab1_down_label"><button type=button oncommand="PME_js_show_tab('PME_dhtml_tab1');">Size</button></td>
<td class="pme-tab" id="PME_dhtml_tab2_down_label"><button type=button oncommand="PME_js_show_tab('PME_dhtml_tab2');">Email</button></td>

<td class="pme-tab" id="PME_dhtml_tab3_down_label"><button type=button oncommand="PME_js_show_tab('PME_dhtml_tab3');">Scripts</button></td>
<td class="pme-tab" id="PME_dhtml_tab4_down_label"><button type=button oncommand="PME_js_show_tab('PME_dhtml_tab4');">Databases</button></td>
<td class="pme-tab" id="PME_dhtml_tab5_down_label"><button type=button oncommand="PME_js_show_tab('PME_dhtml_tab5');">Other</button></td>


but the buttons appear not do anything now, anybody any idea what I've done wrong??

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2006-11-20 08:56
Back to top  Reply with quote     

afaik, it would be a lot easier to play with css to make the link look like button.

 
peg_rtm     Joined: 14 Apr 2006   Posts: 6  
Post Posted: 2007-02-14 02:35
Back to top  Reply with quote     

drum wrote:


Firstly is it possible to have boolean fields displayed as either Radio Button\Checkboxes??

Secondly if you've got a table with over 40 fields, is there an easy way of formation the fields, rather than having just one long list?


THANK YOU THANK YOU THANK YOU for triggering this thread explaining how to make a single checkbox work for a boolean. Now they only problem is, I can't get it to show the checkbox in all the views, even if I specify AVCPVDLF as in:

'select' => 'C',
'options' => 'AVCPVDLF',
'values2' => array('1' => ''),
'name' => 'Ours?',
'maxlen' => 2,

In past experience, the tabs feature works quite nicely. I wish checkboxes worked so well! :)

 
Post new topic   Reply to topic    

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