I have a custom content type "Project" which has two fields "Completed Projects" and "WIP Projects". I have added some of my project as completed and rest of them are wip.

Using webform, I wanted to create a form, which can show ONLY my WIP projects (Not completed projects) in check box option. So that check box entries can be generated dynamically and user can select WIP projects.


You dont have to use tokens there. You can use hook_form_alter to add the correct node titles to the form at that stage. You write a custom query, and populate the empty list.

  • Alexei Rayu, Can you please explain more? Since I am new to drupal, I didn't got you exactly. I'd be thankful of you, if you can point me to some blog to get it. Also, please let me know if there exists any simpler way... – Ravi Joshi Mar 5 '14 at 11:06
  • Ravi, you can do it like this: 1. Create a form, add a select element that fits your purpose, add one default placeholder value. 2. Create a module. 3. Implement hook_form_alter(). Tutorial: websmiths.co/blog/very-introduction-drupals-hookformalter 4. In hook_form_alter, you can add your own values, that you can get from the database by doing a query. drupal.org/node/1343708 – Alexei Rayu Mar 5 '14 at 12:15

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.