Ok I asked the question, because I found this video of yours and thought the code may be in GitHub. I just didn’t know what name to look for it under:
So what I did was to copy that link from that video, follow the instructions in how to find the name of the form and the name of the field I wanted to amend and gave some instructions to chatgpt and I got this code snippet. Appears to work fantastic on the front end:
Here is the code I used and the before and after…
CLAIM LISTING FORM AMEND FORMAT/CONTENT:
add_filter(
'hivepress/v1/forms/listing_claim_submit',
function ( $form ) {
// Add the "subject" field
$form['fields']['subject'] = [
'label' => 'Subject',
'type' => 'text',
'min_length' => 5,
'max_length' => 100,
'_order' => 10,
];
// Add the "Full Name" field
$form['fields']['full_name'] = [
'label' => 'Full Name',
'type' => 'text',
'required' => true, // Set required if needed
'_order' => 20,
];
// Add the "Business Email" field
$form['fields']['business_email'] = [
'label' => 'Business Email',
'type' => 'email',
'required' => true, // Set required if needed
'_order' => 30,
];
// Add the "Business Phone" field
$form['fields']['business_phone'] = [
'label' => 'Business Phone',
'type' => 'tel',
'_order' => 40,
];
// Add the "Verified Social Media Link" field
$form['fields']['social_media_link'] = [
'label' => 'Verified Social Media Link',
'type' => 'url',
'_order' => 50,
];
// Add the "Upload Proof of Business" field
$form['fields']['proof_of_business'] = [
'label' => 'Upload Proof of Business',
'type' => 'file',
'extensions' => ['jpg', 'jpeg', 'png', 'pdf'], // Allowed file types
'_order' => 60,
];
// Customize the "details" field (formerly "text") with a placeholder and character limit
if ( isset( $form['fields']['details'] ) ) {
$form['fields']['details']['max_length'] = 500; // Set a character limit for the details field
$form['fields']['details']['placeholder'] = 'Special Limited Offer - Claim Your Listing for FREE! (RRP £5) .';
}
return $form;
}
);
However, it doesn’t work on the back end just yet.
As the full information doesn’t yet reach my email.
However, the functionality appears to exist as it emails the information from the details box, just fine. I just need the info from the new fields.
Are you able to provide that existing code within your system, of emailing data from all of the fields?