function: get form_name from form_id ?
-
Is there a PHP function I can use to get the form name, associated with a form id?
I built a mu-plugin to set the Paypal Order item description. The plugin gets the form_id from the the form submit $data. I want to lookup the form name from the id, and set the Paypal Order item description to be the form name.
{
"nonce": "f9b6913083",
"form_id": 149223,
"mode": "live",
"form_data": {
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "6.30"
}
}
]
},
"form_fields": {
"radio-1": "1",
"radio-4": "0",
"radio-2": "0",
"radio-3": "0",
"name-1": "shopper-firstname shopper-lastname",
"email-1": "[email protected]",
"address-1-street_address": "1234 shopper address",
"address-1-address_line": "",
"address-1-city": "shopper town",
"address-1-state": "XX",
"address-1-zip": "12345",
"paypal-1": "",
"referer_url": "",
"payment_gateway_total": "",
"forminator_nonce": "f9b6913083",
"_wp_http_referer": "\/shop-payment-form-page\/",
"form_id": "149223",
"page_id": "149224",
"form_type": "default",
"current_url": "https:\/\/shop-domain.com\/",
"render_id": "0",
"action": "forminator_submit_form_custom-forms",
"save_draft": "false"
}
}
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘function: get form_name from form_id ?’ is closed to new replies.