Pass variable in Twig tag My template has this line that I want to update from a field in craft: 

{% set form = craft.formBuilder2.getFormByHandle('schoolTrip') %}


I want 'schoolTrip' to be replaceable by a plain text field in craft. My plain text field is named 'formName'.

{% set form = craft.formBuilder2.getFormByHandle('block.formName') %}


just gives me errors.
It's giving you errors because you put the variable in quotes. Ditch the quotes and try it like this...

{% set form = craft.formBuilder2.getFormByHandle(entry.formName) %}