Putting a custom field in place

Hi there,

I would like to have a “select multiple values” type custom field in
an extension of RT,

The previous custom field works, it is about choosing languages, so
the same type. I created a custom field following this working
example. I set it to Global, following again the example. I put some
new code into UserPrefs.html:

UserPrefs.html:% my $UserWhenEmail =
RT::CustomField->new($session{‘CurrentUser’});
UserPrefs.html:% $UserWhenEmail->Load(107);

where 107 is the id for this new custom field. Also I wrote

<&|/l&>When to e-mail: <& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $UserWhenEmail &>

I cleared the cache and restarted apache but only the "When to e-mail"
label appeared but not the multiple checkboxes. What else should I do
to make it happen? I filled in the multiple possible options for the
custom field.

  • Gergely

The previous custom field works, it is about choosing languages, so
the same type. I created a custom field following this working
example. I set it to Global, following again the example. I put some
new code into UserPrefs.html:

UserPrefs.html:% my $UserWhenEmail =
RT::CustomField->new($session{‘CurrentUser’});
UserPrefs.html:% $UserWhenEmail->Load(107);

where 107 is the id for this new custom field. Also I wrote

<&|/l&>When to e-mail: <& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $UserWhenEmail &>

I cleared the cache and restarted apache but only the "When to e-mail"
label appeared but not the multiple checkboxes. What else should I do
to make it happen? I filled in the multiple possible options for the
custom field.

I suggest adding some error checking around your Load and checking the
apache error logs. Also, ensure that the CF is applied globally and
that rights have been granted to allow editing.

-kevin

Kevin Falcone wrote:

I cleared the cache and restarted apache but only the "When to e-mail"
label appeared but not the multiple checkboxes. What else should I do
to make it happen? I filled in the multiple possible options for the
custom field.

I suggest adding some error checking around your Load and checking the
apache error logs. Also, ensure that the CF is applied globally and
that rights have been granted to allow editing.

You are right, the rights were missing.

  • Gergely