Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  conditional (if/else) displaying of fields on edit page

phpMyEdit General     conditional (if/else) displaying of fields on edit page
Odoslať novú tému   Odpovedať na tému    
 
hlslaughter     Založený: 02.07.2003   Príspevky: 12   Bydlisko: San Diego, CA
Príspevok Zaslal: 2004-09-28 00:49
Návrat hore  Odpovedať s citátom     

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     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-09-28 09:51
Návrat hore  Odpovedať s citátom     

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.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov