PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.3.75
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.3.75
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
leadin / scripts / constants / defaultFormOptions.ts

defaultFormOptions.ts in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.3.75, at scripts/constants/defaultFormOptions.ts

50 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2
3 const BLANK_FORM = 'BLANK';
4 const NEWSLETTER_FORM = 'NEWSLETTER';
5 const CONTACT_US_FORM = 'CONTACT_US';
6 const EVENT_REGISTRATION_FORM = 'EVENT_REGISTRATION';
7 const TALK_TO_AN_EXPERT_FORM = 'TALK_TO_AN_EXPERT';
8 const BOOK_A_MEETING_FORM = 'BOOK_A_MEETING';
9 const GATED_CONTENT_FORM = 'GATED_CONTENT';
10
11 export type FormType =
12 | typeof BLANK_FORM
13 | typeof NEWSLETTER_FORM
14 | typeof CONTACT_US_FORM
15 | typeof EVENT_REGISTRATION_FORM
16 | typeof TALK_TO_AN_EXPERT_FORM
17 | typeof BOOK_A_MEETING_FORM
18 | typeof GATED_CONTENT_FORM;
19
20 export const DEFAULT_OPTIONS = {
21 label: __('Templates', 'leadin'),
22 options: [
23 { label: __('Blank Form', 'leadin'), value: BLANK_FORM },
24 { label: __('Newsletter Form', 'leadin'), value: NEWSLETTER_FORM },
25 { label: __('Contact Us Form', 'leadin'), value: CONTACT_US_FORM },
26 {
27 label: __('Event Registration Form', 'leadin'),
28 value: EVENT_REGISTRATION_FORM,
29 },
30 {
31 label: __('Talk to an Expert Form', 'leadin'),
32 value: TALK_TO_AN_EXPERT_FORM,
33 },
34 { label: __('Book a Meeting Form', 'leadin'), value: BOOK_A_MEETING_FORM },
35 { label: __('Gated Content Form', 'leadin'), value: GATED_CONTENT_FORM },
36 ],
37 };
38
39 export function isDefaultForm(value: FormType) {
40 return (
41 value === BLANK_FORM ||
42 value === NEWSLETTER_FORM ||
43 value === CONTACT_US_FORM ||
44 value === EVENT_REGISTRATION_FORM ||
45 value === TALK_TO_AN_EXPERT_FORM ||
46 value === BOOK_A_MEETING_FORM ||
47 value === GATED_CONTENT_FORM
48 );
49 }
50