Re: XForms: clearing input fields

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 28 Jul 98 07:30:26 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> Who come it is not possible to clear the contents of all input fields in a
> group? ...
>
> Am i stuck with having to set each input field manually?

Basically, yes.

You can write a little routine which loops over every member of the
group, tests to see if the member is an Input object, and then clears
it if it is:

FL_OBJECT *obj;

for ( obj = my_form->some_group->next;
obj->objclass != FL_END_GROUP;
obj = obj->next )
if ( obj->objclass == FL_INPUT )
fl_set_input( obj, "" );

Easy as 3.1415692654...

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/