Skip to content

Not able to use FormBuildHelper. Please suggest me how to use it #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SHAHBAZ1310 opened this issue Dec 6, 2018 · 1 comment
Open

Comments

@SHAHBAZ1310
Copy link

Not able to use FormBuildHelper. Please suggest me how to use it

@etet2007
Copy link

Use FormBuilder instead of FormBuildHelper.

// initialize variables
mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
mFormBuilder = new FormBuilder(this, mRecyclerView);

// declare form elements
FormHeader header = FormHeader.createInstance("Personal Info");
FormElementTextEmail element = FormElementTextEmail.createInstance().setTitle("Email").setHint("Enter Email");
        
// add them in a list
List<FormObject> formItems = new ArrayList<>();
formItems.add(header);
formItems.add(element);

// build and display the form
mFormBuilder.addFormElements(formItems);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants