@flozy/editor 3.3.5 → 3.3.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -69,6 +69,8 @@ const Leaf = ({
|
|
69
69
|
const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
70
70
|
const {
|
71
71
|
id,
|
72
|
+
site_id,
|
73
|
+
page_title,
|
72
74
|
content,
|
73
75
|
onSave,
|
74
76
|
editor: collaborativeEditor,
|
@@ -276,6 +278,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
276
278
|
...(otherProps || {}),
|
277
279
|
readOnly: isReadOnly,
|
278
280
|
page_id: id,
|
281
|
+
site_id: site_id,
|
282
|
+
page_title: page_title,
|
279
283
|
onDrawerOpen: onDrawerOpen
|
280
284
|
};
|
281
285
|
const renderElement = useCallback(props => {
|
@@ -26,6 +26,7 @@ const Form = props => {
|
|
26
26
|
readOnly,
|
27
27
|
site_id,
|
28
28
|
page_id,
|
29
|
+
page_title,
|
29
30
|
onFormSubmit
|
30
31
|
} = customProps;
|
31
32
|
const {
|
@@ -80,7 +81,7 @@ const Form = props => {
|
|
80
81
|
if ((readOnly || test) && formEle && formEle?.current) {
|
81
82
|
const formData = new FormData(formEle?.current);
|
82
83
|
setLoading(true);
|
83
|
-
|
84
|
+
const response = [];
|
84
85
|
let user_email = "";
|
85
86
|
let meta_data = [];
|
86
87
|
const validations = [];
|
@@ -123,18 +124,23 @@ const Form = props => {
|
|
123
124
|
rules: rule?.length > 0 && rule
|
124
125
|
});
|
125
126
|
}
|
126
|
-
response = {
|
127
|
-
|
128
|
-
|
129
|
-
};
|
127
|
+
// response = {
|
128
|
+
// ...response,
|
129
|
+
// [pair[0]]: pair[1],
|
130
|
+
// };
|
131
|
+
const placeholder = fieldData?.name === pair[0] ? fieldData?.placeholder : "";
|
132
|
+
response?.push({
|
133
|
+
[pair[0]]: pair[1],
|
134
|
+
placeholder: placeholder,
|
135
|
+
from_name: formName,
|
136
|
+
page_title: page_title
|
137
|
+
});
|
130
138
|
}
|
131
139
|
let params = {
|
132
140
|
page_id: page_id,
|
133
141
|
site_id: site_id,
|
134
142
|
form_id: `${formName}`,
|
135
|
-
response:
|
136
|
-
...response
|
137
|
-
},
|
143
|
+
response: response,
|
138
144
|
form_data: {
|
139
145
|
user_email: user_email,
|
140
146
|
email: element?.email,
|