I am working in drupal8.I have created five forms all belonging to a single content type.i have around 50 fields in this content type.I have ten fields in a single form.This form has to be filled by the applicant.For each form we have given 20% completion.If i fill one form i shld get 20% completed.If i fill next from i shld get 40% completed and so on.I have created my form and basic crud operations are done.i dont know how to give this percentage of completion.Plz can anyone suggest how this completion percentage has to be done.


The reason your current code isn't working is because your submit handler doesn't follow the correct naming convention (i.e. FORM_FUNCTION_NAME_submit) and you don't explicitly attach the submit handler to the form anywhere so it's not being run.

You can solve this by simply changing the nameof your submit handler:

function example_form_form1_submit($form, $form_state){

Or you could look at system_settings_form() which automates much of this process for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.