'Helper function to extend the form
@param person: the person (Row)
@param formfields: list of form fields (Field)
@param data: the form data (dict)
@param hidden: hidden form fields (dict)
@param permitted: whether the action is permitted
@return: tuple (widget_id, submit_label)'

def get_form_data(self, person, formfields, data, hidden, permitted=False):

    T = current.T
    if (person and permitted):
        payments = self.get_payment_data(person.id)
    else:
        payments = []
    date = S3DateTime.datetime_represent(current.request.utcnow, utc=True)
    formfields.extend([Field('details', label=T('Pending    Payments'), writable=False, represent=self.payment_data_represent), Field('date', label=T('Payment    Date'), writable=False, default=date), Field('comments', label=T('Comments'), widget=s3_comments_widget)])
    data['date'] = s3_str(date)
    data['details'] = payments
    data['comments'] = ''
    hidden['actions'] = json.dumps(payments)
    if (not payments):
        hidden['actionable'] = 'false'
    widget_id = 'payment-form'
    submit = current.T('Register')
    return (widget_id, submit)
