Score:0

Give webform text field computed value

de flag

I have a webform in Drupal 8 that is submitted with the count of each answer from another webform survey form filled out earlier.

So form A is filled out through the month, then form B is submitted at the end of the month with the number of each answer from form A.

I'm trying to figure out the best way to add the default value to the report form B.

  1. hook_form_alter,
  2. .theme function and computed twig value,
  3. AJAX call and set the input field default value.

I'm most curious about 2), but right now any method would work.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.