How can you determine the methods and attributes of objects in PloneFormGen? I want to write some scripts for a custom field adapter and would like to know what is available. My immediate problem comes from some online code I copied from: Python script to hide ploneformgen form after user has filled it out. (For Plone-4.3.2-64.)
alreadyInDB = False
savedData = ploneformgen.savefield.getSavedFormInputForEdit()
username = request.AUTHENTICATED_USER.getId()
return {'username': 'No way man!'}
usersInDB = [x.split(',')[1] for x in savedData.split('\r\n') if len(x)>0]
if username in usersInDB:
alreadyInDB = True
if alreadyInDB:
return {'username': 'No way man!'}
This is the error message I get.
AttributeError: savefield
What I want to do is see what is available for attributes and methods and either fix this or write my own. Any help is appreciated.
This is what we use: PloneFormGen 1.7.12 Products.PFGExtendedMailAdapter 2.4
Plone 4.3.3 (4308) CMF 2.2.7 Zope 2.13.22 Python 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] PIL 2.0.0 (Pillow)