I am using the Charge add-on to connect a website to Stripe payments. I have an action setup whereby a channel entry is created. There are five fields in the channel, four of the fields are text inputs and the last one is a Playa field. The four text inputs are being populated correctly but not the Playa field.
In the code block below, the Playa field is "recipe_purchases_recipe". I am using hidden fields as I only want the form to show the credit card information (removed here for brevity).
This form is embedded in the template as a Stash embed so that I can pass entry variables through. Looking at the code in web inspector I see that the correct variables are coming through, but I can't figure out how to get the Playa field to populate with the entry. I tried {entry_id}, {url_title} and {title} but no luck so far.
How do I populate a Playa field in an entry using the Charge action?
{exp:charge:form
form_id="charge-form"
on_success="create_recipe_purchase_entry"
on_success:recipe_purchases_order_number="{id}"
on_success:recipe_purchases_customer_name="{customer_name}"
on_success:recipe_purchases_amount="{plan_amount}"
on_success:recipe_purchases_recipe="{stash:entry_id}"
return="/recipes/{segment_2}/thanks"
return_error="/recipes/{segment_2}/buy"
}
<input type="hidden" id="customer_name" name="customer_name" value="{exp:zoo_visitor:details}{visitor:member_firstname} {visitor:member_lastname}{/exp:zoo_visitor:details}" />
<input type="hidden" id="customer_email" name="customer_email" value="{email}" />
<input type="hidden" id="plan_amount" name="plan_amount" value="{recipe_price}" />
<input type="hidden" id="recipe_purchases_recipe" name="recipe_purchases_recipe[]" value="{stash:entry_id}" />
...
{/exp:charge:form}