You can use this function to remove all assigned fields from a FIELDSET.
clear_fieldset ( fieldset )
The function has one parameter:
The result of the function is type BOOL; if the field set was cleared successfully the function returns TRUE, otherwise it will return FALSE.