The variable ```name``` is not defined... I believe you meant to use ```id``` instead?