[OGo-Users] Default value for Comment field

Gregory Malsack users@opengroupware.org
Tue, 13 Feb 2007 14:52:05 -0600


I've tried what you recommended, however it has not changed the system.
I also then tried a more traditional syntax. Here is an excerpt of the 2
items I have tried, neither of these are working; any other thoughts?

                  <var:component className=3D"SkyTextEditor"
name=3D"aptcomment"
                        text    =3D "comment"
                        rows    =3D
"session.userDefaults.scheduler_editor_comment_rows"
                        columns =3D
"session.userDefaults.scheduler_editor_comment_columns"
                        const:wrap=3D"physical" />
                        <script type=3D"text/javascript">
                        document.aptcomment.value =3D "My Default
Comment."; </script>

                  <var:component className=3D"SkyTextEditor"
name=3D"aptcomment"
                        text    =3D "comment"
                        rows    =3D
"session.userDefaults.scheduler_editor_comment_rows"
                        columns =3D
"session.userDefaults.scheduler_editor_comment_columns"
                        const:wrap=3D"physical" />
                        <script>$F("aptcomment").value =3D "My Default
Comment."</script>

What am I doing wrong?

Thanks for all of your help,
Greg
=20

-----Original Message-----
From: users-admin@opengroupware.org
[mailto:users-admin@opengroupware.org] On Behalf Of Helge Hess
Sent: Monday, February 12, 2007 6:10 PM
To: users@opengroupware.org
Subject: Re: [OGo-Users] Default value for Comment field

On Feb 12, 2007, at 19:41, Gregory Malsack wrote:
> I would like to add a default value to the comments field in the=20
> appointment scheduler form.

Just a static text like "enter something in here" or something more
dynamic?

If JavaScript is OK, the most trivial way is to give the SkyTextEditor
in LSWAppointmentEditor.wox an explicit name and then use JS to add
content, something like that:

   <var:component className=3D"SkyTextEditor" name=3D"aptcomment"
                  text    =3D "comment"
   ...
   <script>$F("aptcomment").value =3D "enter something here"</script>

Well, otherwise you would need to edit LSWAppointmentEditor.m and
prefill the 'comment' ivar, eg inside the

   - (BOOL)prepareForNewCommand:(NSString *)_command
     type:(NGMimeType *)_type
     configuration:(NSDictionary *)_cmdCfg

method.

Greets,
   Helge
--
Helge Hess
http://www.helgehess.eu/


--=20
OpenGroupware.org Users
users@opengroupware.org
http://mail.opengroupware.org/mailman/listinfo/users