Home · Links · Contact Us
Home arrow Forums
Home
Features
FAQ
Screen Shots
Modules
Themes
Demos
Documentation
Forums
Contact Us
Download
Purchase
Quotes

" ... I want to tell you that your thyme product is functional and valuable beyond words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."

" ... Thanks for such a complete project, its making my job much easier. ..."

" ... I have now deployed 4 different calendars and our users love them ... "

" ... Easy to install and use and a great look/design. ..."

" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."


  FAQFAQ    SearchSearch  RegisterRegister   Log inLog in 
Custom fields for events?
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic     Forum Index -> Hacking Thyme
View previous topic :: View next topic  
Author Message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Sun Nov 05, 2006 7:37 pm    Post subject: Reply with quote

Hi,

Yes they do. Just give them the same name as the field in the Events table. Everything else should take care of itself.
Back to top
View user's profile Send private message Visit poster's website
smeallum



Joined: 17 May 2006
Posts: 177

PostPosted: Sun Nov 05, 2006 10:52 pm    Post subject: Reply with quote

fantastic...

this is a good example of how well designed Thyme is Wink

Cheers,
NiCo
Back to top
View user's profile Send private message
smeallum



Joined: 17 May 2006
Posts: 177

PostPosted: Wed Dec 20, 2006 7:01 pm    Post subject: Reply with quote

ian wrote:
Hi,
It will probably require that you set this to the onKeyDown and/or onKeyUp event for the text box. In which case for your text box you would add a 3rd argument. Something like:

Code:
$_cal_form->textbox('myfield', 32,
   "onKeyUp='only_numbers()' onKeyDown='only_numbers()'");


Where 'only_numbers()' is the javascript function you added. This function would go at the bottom of include/templates/event_edit_tpl.php.

Let me know if you have any more questions.


Hi ian...

i might be missing something for making my "price" custom field allow only numbers in event_edit. Maybe you spot it right away. This is what i have:

Code:

echo('           '._PRECIO_.''.$_cal_form->textbox('cust_precio', 32 , "onKeyUp='isDigit(event.KeyCode)' onKeyDown='isDigit(event.KeyCode)'"));


and at the bottom, the javascript function:

Code:

function isDigit(nKeyCode)
{
   // Test for digit keycode (0-9).
   if((nKeyCode > 47) && (nKeyCode <  58))
   {
      return true;
   }
   
   return false;
}


Any idea why i can still write letters in the field?

Cheers,
NiCo
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Wed Dec 20, 2006 8:39 pm    Post subject: Reply with quote

Hi,

Off the top of my head.. no idea. Does Firefox show any errors in the Error Console? Tools -> Error Console
Back to top
View user's profile Send private message Visit poster's website
smeallum



Joined: 17 May 2006
Posts: 177

PostPosted: Thu Dec 21, 2006 6:33 am    Post subject: Reply with quote

no errors in Firefox error console Crying or Very sad
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5275

PostPosted: Thu Dec 21, 2006 1:13 pm    Post subject: Reply with quote

Maybe the person who wrote that javascript has an idea of why it is not working.
Back to top
View user's profile Send private message Visit poster's website
smeallum



Joined: 17 May 2006
Posts: 177

PostPosted: Thu Dec 21, 2006 2:07 pm    Post subject: Reply with quote

Like this it works:

Code:

echo('           '._PRECIO_.''.$_cal_form->textbox('cust_precio', 32 , "onKeyUp='return isDigit(event.KeyCode)' onKeyDown='return isDigit(event.KeyCode)'"));


i figured that out by comparing with another example i saw somewhere. The "returns" were missing.

Thanks Smile
NiCo/SMeaLLuM
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Hacking Thyme All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2005 eXtrovert software unless otherwise noted. All rights reserved.
Portions © 2004 Ben Brown. All rights reserved.
Trademarks are property of their respective owners.