Erik Andersson kirjoitti:
> Hi
>
> I asked around on #trac but noone seemed to be able to help me out, so
> maybe I'm doing it wrong.. I'll ask here as well just to be sure.
>
> I'm playing with some ticket templates. I wanted to be able to set the
> ticket type depending on the template used and then disable the type
> dropdown so that the type cannot be changed..
> I'm using a streamfilter to disable the dropdown:
> Transformer("//[EMAIL PROTECTED]'field-type']").attr('disabled', 'disabled')
>
> It looks good when viewing and entering data into the ticket, but when
> saved/submitted the ticket type is still the default type.
> I also tried setting type=workorder in the URL as some people
> recommended, but still no effect. When submitting, the type value is the
> default.
>
> I'm guessing the problem to be related to that I'm disabling the
> type-dropdown
User agents usually don't send disabled fields.
So you need to create hidden field with correct name and value and then
setup phantom display value to your dropdown - propably with piece of JS
if enabled to copy selected value to hidden field.
--
Jani Tiainen
"Tein sein mihin näillä lahjoilla pystyin.
Tein sen, en yhtään enempää." - Martti Servo & Napander
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---