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  »  conditional (if/else) displaying of fields on edit page

phpMyEdit General     conditional (if/else) displaying of fields on edit page
Post new topic   Reply to topic    
 
hlslaughter     Joined: 02 Jul 2003   Posts: 12   Location: San Diego, CA
Post Posted: 2004-09-28 00:49
Back to top  Reply with quote     

I've seen similar topics posted, but nothing exactly like this.

My goal is to hide a text field in the edit/create views if that field is not relevant to the particular item.

Specifically, I havea 'serialized' (as in item has a serial number) field that's an enum of (yes, no). if an item is not serialized, i do not want to display a text area that is supposed to contain a list of serial numbers.

if (row item is serialzed)
display text input field
else
don't display input field

from what I can tell, this is not possible. i don't believe you can have any logical operators in the "$opts" blocks.

it's not a catastrophe if i display this field when it is not needed, but i'd like to hide it if i can.

ps - i know i've only posted questions and no answers to this forum, but i'm not familiar enough with phpmyedit to feel comfortable giving advice yet :)

tks

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2004-09-28 09:51
Back to top  Reply with quote     

you are right, there is no such possibility.

as a workaround, you can have a pre-screen like: click 'here' to add serialized and 'here' to add non serialized.
those links would lead to two different pages/settings with different fields.

for change, that will be harder, setting and unsetting variables of $this in pre-triggers, but that will have huge side effects.

 
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