1

For my module I need a settings form where administrators should be able to enter an arbitrary number of variables.

I have tried setting up an AJAX 'Add more' button, analogous to the example found in the AJAX example module. When I click the button, it doesnt add an extra field and I don't get any errors.

Can anyone help me out?

Example code, and my code: https://gist.github.com/Tagini/8282034

0

It turns out I had two problems:

  1. I have jquery_update installed, which included a version too recent for the backend. I configured a previous version and I got a whole step further.

  2. I did not have my $form and $form_state as input parameters in my main form function and as such the field count was not updated.

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.