-
+
+
-
{{ field.label }}
- {{ field.value }}
+ {{ field.label }}
+
+
+
+
+ {{ field.value }}
+
+
+
+
+
{{ field.label }}
+
+
+
+
+ {{ field.value }}
+
+
+
+
+
{{ field.label }}:
- {{ field.value }}
+
+
+
+
+ {{ field.value }}
+
+
{{ field.label }}
- {{ field.value }}
+
+
+
+
+ {{ field.value }}
+
@@ -1470,6 +1539,21 @@ const updateRepeatingGroupField = (groupName, groupIndex, fieldName, value) => {
// Duplicate RepeatingGroupContainer definition removed
+// Handle info display button clicks
+const handleInfoButtonClick = (url, openInNewTab = false) => {
+ if (!url) return;
+
+ try {
+ if (openInNewTab) {
+ window.open(url, '_blank', 'noopener,noreferrer');
+ } else {
+ window.location.href = url;
+ }
+ } catch (error) {
+ console.error('Error opening URL:', error);
+ }
+};
+
// Update table data for repeating-table component
const updateTableData = (newData) => {
const tableName = props.component.props.name;
diff --git a/components/FormBuilderComponents.vue b/components/FormBuilderComponents.vue
index feac1ac..f895ca1 100644
--- a/components/FormBuilderComponents.vue
+++ b/components/FormBuilderComponents.vue
@@ -707,17 +707,22 @@ const availableComponents = [
name: 'Info Display',
category: 'Layout',
icon: 'material-symbols:info-outline',
- description: 'Display read-only information in key-value format',
+ description: 'Display read-only information in key-value format with optional buttons',
defaultProps: {
+ name: 'info_display',
title: 'Information',
+ help: 'Display important information in an organized format',
fields: [
- { label: 'Customer Name', value: 'John Doe', key: 'customer_name' },
- { label: 'Email', value: 'john@example.com', key: 'customer_email' },
- { label: 'Phone', value: '+1-234-567-8900', key: 'customer_phone' }
+ { label: 'Customer Name', value: 'John Doe', key: 'customer_name', type: 'text' },
+ { label: 'Email', value: 'john@example.com', key: 'customer_email', type: 'text' },
+ { label: 'Phone', value: '+1-234-567-8900', key: 'customer_phone', type: 'text' },
+ { label: 'View Profile', value: 'View Details', key: 'profile_link', type: 'button', url: 'https://example.com/profile', openInNewTab: true, icon: 'material-symbols:link' }
],
- layout: 'vertical', // vertical, horizontal, grid
+ layout: 'side-by-side', // vertical, horizontal, grid, side-by-side
showBorder: true,
- backgroundColor: '#f9fafb'
+ backgroundColor: '#f9fafb',
+ width: '100%',
+ gridColumn: 'span 12'
}
},
{
diff --git a/components/FormBuilderConfiguration.vue b/components/FormBuilderConfiguration.vue
index 505cdb3..ed2b1c4 100644
--- a/components/FormBuilderConfiguration.vue
+++ b/components/FormBuilderConfiguration.vue
@@ -589,45 +589,79 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -661,7 +695,23 @@
:classes="{ outer: 'mb-0' }"
/>
-
@@ -1103,7 +1197,11 @@ const addInfoField = () => {
configModel.value.fields.push({
label: `Field ${configModel.value.fields.length + 1}`,
value: 'Value',
- key: `field_${configModel.value.fields.length + 1}`
+ key: `field_${configModel.value.fields.length + 1}`,
+ type: 'text', // text, button
+ url: '', // for button type
+ openInNewTab: false, // for button type
+ icon: '' // for button type
});
};
diff --git a/components/FormBuilderFieldSettingsModal.vue b/components/FormBuilderFieldSettingsModal.vue
index a087629..b030566 100644
--- a/components/FormBuilderFieldSettingsModal.vue
+++ b/components/FormBuilderFieldSettingsModal.vue
@@ -156,6 +156,68 @@
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2143,6 +2205,188 @@ if (this.element.querySelector('.file-upload')) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Information Fields
+
Configure the information that will be displayed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ field.label || `Field ${index + 1}` }}
+
+
+ {{ field.type === 'button' ? 'Button Field' : 'Text Field' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Button Settings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
No information fields yet
+
Add fields to display information to your users
+
+
+
+
+
@@ -2337,6 +2581,8 @@ if (this.element.querySelector('.file-upload')) {
placeholder="e.g., required|email|length:3,50"
/>
+
+