Currently, I need dynamically add items (form elements, more specifically field collection items) to form via JS or Jquery ways.
Anyone has ideas how to do this is appreciated
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From you question I understand that, you’re trying to fetch field from database and depending on those field wanna to add fields to HTML.
A possible solution:
Step 1: Send request to php file through AJAX and get the list of field [response may be HTML, JSON etc].
Step 2: If response is HTML then set the whole HTML to container/ if json then make looping on them and add them to container