[Rt-devel] Question About Validate Custom Field

Pablo Silva psilvao at yahoo.com
Thu Aug 5 12:19:58 EDT 2004


Hi Tina!

Thanks for your comments, my problem is:

I have 2 custom fields, where I must to input dates
and hours, the formats are:

custom field 1 : dd-mm-yyyy
custom field 2 : hh:mm

where dd (day), mm (month), yyyy (year), hh (hour), mm
(minutes).

Searching the source code, I finded one file, where I 
may insert javascript code, for example if you see the
file
/opt/rt3/share/html/Ticket/Elements/EditCustomField

line number: 30 and insert a javascript code for
example a popup window with a message "Hola"

if ($CustomField->Type eq 'FreeformSingle') {
     29       <input
name="<%$NamePrefix%><%$CustomField->Id%>-Value"
     30         size="<%$Cols%>"
OnClick="javascript:alert('Hola');"

It's works, but it's very hard to implement, with the
templates exists other form for to do the same?

I feel as Hamblet... to do or not to do .... ;-)

Thanks in advance!
Pablo

 

--- Tina Schade <Tina.Schade at gmx.de> wrote:

> Am Donnerstag, 5. August 2004 16:25 schrieb Pablo
> Silva:
> > Hi Michel!
> >
> >  Thank's for your answer, I have a question about
> > this.
> >
> > In my work, we need a template with 2 custom
> fields,
> > for date entry, we want when an user make a click
> in
> > these  fields, open a pop up windows, for to
> select a
> > date.
> >
>  
> Hello Pablo,
> 
> Does I understand you right, that you want select a
> value from a 
> cusomfield-selectbox and work with the value which
> the user selected??
> 
> I don´t know if you want to fill the customfield
> dynamically (or for what do 
> you need a pop up window?) or if your problem is
> more to show new data to the 
> selected value.
> 
> I made some of such things. Maybe I can help you.
> 
> Greetings,
> Tina
> 
> 
> > Do you an example for this?, where I can find
> > documentation for to work with templates in RT?
> >
> > Thank's in advance
> >
> > Pablo
> > --- "Michael S. Liebman"
> <m-liebman at northwestern.edu>
> >
> > wrote:
> > > At 06:23 PM 8/4/2004, Pablo Silva wrote:
> > > >    I want to vallidate two custom fields, my
> first
> > > >question is it possible?
> > >
> > > By validate do you mean check that a value has
> been
> > > entered or conforms to
> > > specified pattern? Most people do that through
> > > custom JavaScript.
> > >
> > > Michael
> > >
> > > --
> > > Michael S. Liebman
> > > m-liebman at northwestern.edu
> > >                  http://msl521.freeshell.org/
> > > "I have vision and the rest of the world wears
> > > bifocals."
> > >         -Paul Newman in "Butch Cassidy & the
> > > Sundance Kid"
> >
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - Send 10MB messages!
> > http://promotions.yahoo.com/new_mail
> > _______________________________________________
> > Rt-devel mailing list
> > Rt-devel at lists.bestpractical.com
> >
>
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
> 
> 



		
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 


More information about the Rt-devel mailing list