mardi 1 mars 2016

complex looping in swig template

Hi I have a array of questions as

[ { question: 'What is your Name', 
    relatedApi: '/put/user' },
  { question: 'What is your restaurant Name',
    relatedApi: '/put/user' },
  { question: 'Add a diss to your restaurant',
    relatedApi: '/post/item' } ]

I am designing everything in swig template , Now I want to design three forms which will pop up one after the other, each one is having input field and one question as per array content and will send a POST request on the relatedAPI ,and once the succes mesage is recived from the api next form with question will pops up. Have no idea how to make this possible in swig template , any help or suggestion is appreciable




Aucun commentaire:

Enregistrer un commentaire