@AtomBombed , I hope the below helps. The variables are named long on purpose. But if you look at the dialogs doc with this example, I think it should be clear.
import dialogs
import datetime
def show_list_dialog(title, items):
return dialogs.list_dialog(title = title, items = items)
def show_form_dialog(title, fields):
return dialogs.form_dialog(title = title, fields = fields)
if __name__ == '__main__':
lst = ['red', 'blue', 'orange', 'purple']
x = show_list_dialog(title = 'A List Dialog', items = lst)
print x
form_list_of_dicts = []
form_list_of_dicts.append(dict(type = 'text', title = 'First Name',
key = 'first', placeholder = 'Ole'))
form_list_of_dicts.append(dict(type = 'text', title = 'Last Name',
key = 'last', placeholder = 'Zorn'))
form_list_of_dicts.append(dict(type = 'date', title = 'Date Of Birth',
key = 'DOB', value = datetime.date.today()))
x = show_form_dialog(title = 'A Form Dialog', fields = form_list_of_dicts)
print x