Repository: adobe/aem-core-forms-components
Pull request #1540: feat: added fd:submit namespace in headless json in case of Submissio…
Author: login: deepprakash345
Created: 2025-03-05T09:23:50Z | Merged: 2025-03-11T13:01:13Z

Blocked PR:-
https://git.corp.adobe.com/livecycle/af2-rest-api/pull/221


Diff:
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormConstants.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormConstants.java
index 2944ee3f6c..d5f64f60d9 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormConstants.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormConstants.java
@@ -142,4 +142,10 @@ private FormConstants() {
 
     /* The resource type for the pre-selected the linked panel */
     public final static String RT_FD_FORM_REVIEW_DATASOURCE_V1 = RT_FD_FORM_PREFIX + "review/v1/datasource";
+
+    /** Request header/attribute name for form definition jsonview type */
+    public static final String X_ADOBE_FORM_DEFINITION = "x-adobe-form-definition";
+
+    /** Form definition type indicating submission view */
+    public static final String FORM_DEFINITION_SUBMISSION = "submission";
 }
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormStructureParserImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormStructureParserImpl.java
index 45a8f4b742..59e8d89d32 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormStructureParserImpl.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormStructureParserImpl.java
@@ -30,6 +30,7 @@
 
 import com.adobe.cq.forms.core.components.models.form.FormContainer;
 import com.adobe.cq.forms.core.components.models.form.FormStructureParser;
+import com.adobe.cq.forms.core.components.models.form.HtlUtil;
 import com.adobe.cq.forms.core.components.util.ComponentUtils;
 import com.adobe.cq.forms.core.components.views.Views;
 import com.fasterxml.jackson.core.SerializableString;
@@ -122,9 +123,19 @@ public String getFormDefinition() {
             HTMLCharacterEscapes htmlCharacterEscapes = new HTMLCharacterEscapes();
             ObjectMapper mapper = new ObjectMapper();
             Writer writer = new StringWriter();
-            ObjectWriter objectWriter = mapper.writerWithView(Views.Publish.class);
+            ObjectWriter objectWriter;
+            boolean isSubmissionView = false;
+            if (request != null) {
+                HtlUtil htlUtil = request.adaptTo(HtlUtil.class);
+                isSubmissionView = (htlUtil != null && htlUtil.isEdgeDeliveryRequest())
+                    || ComponentUtils.shouldIncludeSubmitProperties(request);
+            }
+
+            if (isSubmissionView) {
+                request.setAttribute(FormConstants.X_ADOBE_FORM_DEFINITION, FormConstants.FORM_DEFINITION_SUBMISSION);
+            }
+            objectWriter = mapper.writerWithView(Views.Publish.class);
             objectWriter.getFactory().setCharacterEscapes(htmlCharacterEscapes);
-            // return publish view specific properties only for runtime
             objectWriter.writeValue(writer, formContainer);
             result = writer.toString();
         } catch (Exception e) {
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java
index 6ec62ae2e7..34844e24b5 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java
@@ -166,6 +166,18 @@ private ReservedProperties() {
     public static final String FD_XFA_SCRIPTS = "fd:xfaScripts";
 
     public static final String FD_DRAFT_ID = "fd:draftId";
+
+    // Begin: Form submission related properties
+    public static final String FD_SUBMIT_PROPERTIES = "fd:submit";
+    public static final String PN_SUBMIT_ACTION_TYPE = "actionType";
+    public static final String PN_SUBMIT_ACTION_NAME = "actionName";
+    public static final String PN_SUBMIT_EMAIL_TO = "mailto";
+    public static final String PN_SUBMIT_EMAIL_FROM = "from";
+    public static final String PN_SUBMIT_EMAIL_SUBJECT = "subject";
+    public static final String PN_SUBMIT_EMAIL_CC = "cc";
+    public static final String PN_SUBMIT_EMAIL_BCC = "bcc";
+    public static final String PN_SUBMIT_SPREADSHEETURL = "spreadsheetUrl";
+    // End: Form submission related properties
     private static final Set<String> reservedProperties = aggregateReservedProperties();
 
     private static Set<String> aggregateReservedProperties() {
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
index dd00390751..9e238e9113 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
@@ -15,15 +15,19 @@
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 package com.adobe.cq.forms.core.components.internal.models.v2.form;
 
+import java.util.Arrays;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.function.Consumer;
 
 import javax.annotation.PostConstruct;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.http.osgi.services.HttpClientBuilderFactory;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.models.annotations.Default;
 import org.apache.sling.models.annotations.Exporter;
 import org.apache.sling.models.annotations.Model;
@@ -80,9 +84,18 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
     private static final String FD_CUSTOM_FUNCTIONS_URL = "fd:customFunctionsUrl";
     private static final String FD_DATA_URL = "fd:dataUrl";
 
+    /** Constant representing email submit action type */
+    private static final String SS_EMAIL = "email";
+
+    /** Constant representing spreadsheet submit action type */
+    private static final String SS_SPREADSHEET = "spreadsheet";
+
     @OSGiService(injectionStrategy = InjectionStrategy.OPTIONAL)
     private CoreComponentCustomPropertiesProvider coreComponentCustomPropertiesProvider;
 
+    @OSGiService(injectionStrategy = InjectionStrategy.OPTIONAL)
+    private HttpClientBuilderFactory clientBuilderFactory;
+
     private static final String DRAFT_PREFILL_SERVICE = "service://FP/draft/";
 
     @SlingObject(injectionStrategy = InjectionStrategy.OPTIONAL)
@@ -277,6 +290,16 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = ComponentUtils.getSupportedSubmitActions(clientBuilderFactory);
+        String resourceType = resource.getValueMap().get("sling:resourceType", String.class);
+        if (supportedSubmitActions.contains(resource.getValueMap().get(ReservedProperties.PN_SUBMIT_ACTION_NAME))) {
+            if (resourceType != null && resourceType.contains("/franklin")) {
+                return "";
+            } else {
+                return "https://forms.adobe.com" + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" +
+                    ComponentUtils.getEncodedPath(resource.getPath() + ".model.json");
+            }
+        }
         return getContextPath() + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" + getId();
     }
 
@@ -359,7 +382,10 @@ public String getLanguageDirection() {
         }
         properties.put(FD_CUSTOM_FUNCTIONS_URL, getCustomFunctionUrl());
         properties.put(FD_DATA_URL, getDataUrl());
-
+        Map<String, Object> submitProperties = getSubmitProperties();
+        if (submitProperties != null && !submitProperties.isEmpty()) {
+            properties.put(ReservedProperties.FD_SUBMIT_PROPERTIES, submitProperties);
+        }
         return properties;
     }
 
@@ -424,4 +450,39 @@ public AutoSaveConfiguration getAutoSaveConfig() {
         return autoSaveConfig;
     }
 
+    private Map<String, Object> getSubmitProperties() {
+
+        Map<String, Object> submitProps = null;
+
+        if (request == null || ComponentUtils.shouldIncludeSubmitProperties(request)) {
+            submitProps = new LinkedHashMap<>();
+            List<String> submitActionProperties = Arrays.asList(
+                ReservedProperties.PN_SUBMIT_ACTION_TYPE,
+                ReservedProperties.PN_SUBMIT_ACTION_NAME);
+
+            List<String> submitEmailProperties = Arrays.asList(
+                ReservedProperties.PN_SUBMIT_EMAIL_TO,
+                ReservedProperties.PN_SUBMIT_EMAIL_FROM,
+                ReservedProperties.PN_SUBMIT_EMAIL_SUBJECT,
+                ReservedProperties.PN_SUBMIT_EMAIL_CC,
+                ReservedProperties.PN_SUBMIT_EMAIL_BCC);
+
+            List<String> submitSpreadsheetProperties = Arrays.asList(
+                ReservedProperties.PN_SUBMIT_SPREADSHEETURL);
+            ValueMap resourceMap = resource.getValueMap();
+            for (Map.Entry<String, Object> entry : resourceMap.entrySet()) {
+                if (submitActionProperties.contains(entry.getKey())) {
+                    submitProps.put(entry.getKey(), entry.getValue());
+                } else if (submitEmailProperties.contains(entry.getKey())) {
+                    submitProps.computeIfAbsent(SS_EMAIL, k -> new LinkedHashMap<String, Object>());
+                    ((Map<String, Object>) submitProps.get(SS_EMAIL)).put(entry.getKey(), entry.getValue());
+                } else if (submitSpreadsheetProperties.contains(entry.getKey())) {
+                    submitProps.computeIfAbsent(SS_SPREADSHEET, k -> new LinkedHashMap<String, Object>());
+                    ((Map<String, Object>) submitProps.get(SS_SPREADSHEET)).put(entry.getKey(), entry.getValue());
+                }
+            }
+        }
+        return submitProps;
+    }
+
 }
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/util/ComponentUtils.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/util/ComponentUtils.java
index 7f2571763e..f90fb52a08 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/util/ComponentUtils.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/util/ComponentUtils.java
@@ -16,20 +16,31 @@
 package com.adobe.cq.forms.core.components.util;
 
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Base64;
 import java.util.Date;
+import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
 
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.osgi.services.HttpClientBuilderFactory;
+import org.apache.http.util.EntityUtils;
 import org.apache.jackrabbit.JcrConstants;
+import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ValueMap;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.adobe.aemds.guide.utils.GuideUtils;
 import com.adobe.cq.forms.core.components.internal.form.FormConstants;
@@ -37,6 +48,9 @@
 import com.day.cq.i18n.I18n;
 import com.day.cq.wcm.api.policies.ContentPolicy;
 import com.day.cq.wcm.api.policies.ContentPolicyManager;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
 
 import static com.adobe.cq.forms.core.components.internal.form.FormConstants.FORM_FIELD_TYPE;
 
@@ -47,6 +61,7 @@ public class ComponentUtils {
 
     private static final String EDGE_DELIVERY_FRAGMENT_CONTAINER_REL_PATH = "root/section/form";
     private static final String[] EDGE_DELIVERY_RESOURCE_TYPES = new String[] { "core/franklin/components/page/v1/page" };
+    private static final Logger logger = LoggerFactory.getLogger(ComponentUtils.class);
 
     /**
      * Private constructor to prevent instantiation of utility class.
@@ -244,4 +259,89 @@ public static boolean isFragmentComponent(Resource resource) {
         return resource != null && resource.getValueMap().get(FormConstants.PROP_FRAGMENT_PATH, String.class) != null;
     }
 
+    /**
+     * Determines whether submit properties should be included in the form
+     * definition.
+     * 
+     * <p>
+     * This method checks if the request contains x-adobe-form-definition attribute
+     * or header and if it is equal to submission
+     * that indicates submit properties should be included in the form definition.
+     * </p>
+     *
+     * @param request the {@link SlingHttpServletRequest} to check
+     * @return true if submit properties should be included, false otherwise
+     */
+    public static boolean shouldIncludeSubmitProperties(SlingHttpServletRequest request) {
+        if (request == null) {
+            return false;
+        }
+        String submissionHeaderName = FormConstants.FORM_DEFINITION_SUBMISSION;
+        return submissionHeaderName.equals(request.getAttribute(FormConstants.X_ADOBE_FORM_DEFINITION)) ||
+            submissionHeaderName.equals(request.getHeader(FormConstants.X_ADOBE_FORM_DEFINITION));
+    }
+
+    /**
+     * Retrieves a list of supported submit actions from the Adobe Forms service.
+     * 
+     * <p>
+     * This method makes an HTTP GET request to the Adobe Forms service to fetch
+     * the list of supported submit actions. The response is expected to be a
+     * JSON object containing a "submissions" array of action names, which is then
+     * converted to a list.
+     * </p>
+     * 
+     * <p>
+     * If the request fails or an error occurs during processing, an error is logged
+     * and an empty list is returned.
+     * </p>
+     *
+     * @param clientBuilderFactory The HTTP client builder factory used to create
+     *            the HTTP client
+     * @return A list of supported submit action names, or an empty list if the
+     *         request fails
+     */
+    public static List<String> getSupportedSubmitActions(HttpClientBuilderFactory clientBuilderFactory) {
+        String supportedSubmitActionsUrl = "https://forms.adobe.com/adobe/forms/af/submit";
+        List<String> supportedSubmitActions = new ArrayList<>();
+        if (clientBuilderFactory == null) {
+            logger.error("clientBuilderFactory is null");
+            return supportedSubmitActions;
+        }
+        try {
+            RequestConfig requestConfig = RequestConfig.custom()
+                .setConnectTimeout(5000)
+                .setSocketTimeout(5000)
+                .setConnectionRequestTimeout(5000)
+                .build();
+            CloseableHttpClient httpClient = clientBuilderFactory.newBuilder()
+                .setDefaultRequestConfig(requestConfig)
+                .build();
+            HttpGet httpGet = new HttpGet(supportedSubmitActionsUrl);
+            try (CloseableHttpResponse response = httpClient.execute(httpGet)) {
+                if (isSuccessfulResponse(response)) {
+                    String responseBody = EntityUtils.toString(response.getEntity());
+                    JsonNode rootNode = new ObjectMapper().readTree(responseBody);
+                    ArrayNode submissionsNode = (ArrayNode) rootNode.get("supported");
+                    if (submissionsNode != null && submissionsNode.isArray()) {
+                        submissionsNode.forEach(submission -> {
+                            String submissionText = submission.asText();
+                            supportedSubmitActions.add(submissionText);
+                        });
+                    } else {
+                        logger.error("supported node was null or not an array");
+                    }
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while fetching supported submit actions", e);
+        }
+        return supportedSubmitActions;
+    }
+
+    private static boolean isSuccessfulResponse(CloseableHttpResponse response) {
+        return response.getStatusLine() != null
+            && response.getStatusLine().getStatusCode() == java.net.HttpURLConnection.HTTP_OK;
+    }
+
 }
diff --git a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java
index ee12076ac9..e9ec338061 100644
--- a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java
+++ b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java
@@ -106,7 +106,8 @@ public static void testJSONExport(Object model, String expectedJsonResource) {
             fail("Unable to find test file " + expectedJsonResource + ".");
         }
         IOUtils.closeQuietly(is);
-        // this is added so that other components like form portal, aem form etc don't get validated against schema
+        // this is added so that other components like form portal, aem form etc don't
+        // get validated against schema
         if (model instanceof FormComponent) {
             Utils.testSchemaValidation(model);
         }
diff --git a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImplTest.java b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImplTest.java
index 8475c790f2..ed2628bbbd 100644
--- a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImplTest.java
+++ b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImplTest.java
@@ -16,6 +16,7 @@
 package com.adobe.cq.forms.core.components.internal.models.v2.form;
 
 import java.lang.reflect.Method;
+import java.util.Base64;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -27,6 +28,12 @@
 import java.util.stream.Collectors;
 import java.util.stream.StreamSupport;
 
+import org.apache.http.StatusLine;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.osgi.services.HttpClientBuilderFactory;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.i18n.ResourceBundleProvider;
 import org.apache.sling.testing.mock.sling.MockResourceBundle;
@@ -48,6 +55,7 @@
 import com.adobe.cq.forms.core.components.internal.form.FormConstants;
 import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
 import com.adobe.cq.forms.core.components.models.form.*;
+import com.adobe.cq.forms.core.components.views.Views;
 import com.adobe.cq.forms.core.context.FormsCoreComponentTestContext;
 import com.day.cq.i18n.I18n;
 import com.day.cq.wcm.api.NameConstants;
@@ -55,6 +63,8 @@
 import com.day.cq.wcm.api.PageManager;
 import com.day.cq.wcm.foundation.model.export.AllowedComponentsExporter;
 import com.day.cq.wcm.msm.api.MSMNameConstants;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import io.wcm.testing.mock.aem.junit5.AemContext;
 import io.wcm.testing.mock.aem.junit5.AemContextExtension;
 
@@ -64,9 +74,11 @@
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 @ExtendWith(AemContextExtension.class)
 public class FormContainerImplTest {
@@ -75,8 +87,17 @@ public class FormContainerImplTest {
     private static final String CONTENT_ROOT = CONTENT_PAGE_ROOT + "/jcr:content";
     private static final String CONTENT_DAM_ROOT = "/content/dam/formsanddocuments/demo";
     private static final String PATH_FORM_1 = CONTENT_ROOT + "/formcontainerv2";
-    private static final String PATH_FORM_WITHOUT_FIELDTYPE = CONTENT_ROOT + "/formcontainerv2-without-fieldtype";
+    private static final String PATH_FORM_SUBMISSION_VIEW = CONTENT_ROOT + "/formcontainer-submissionView";
+    private static final String PATH_UE_FORM_WITH_SPREADSHEET_SUBMISSION = CONTENT_ROOT
+        + "/formContainer-ue-form-spreadsheet-submission";
+    private static final String PATH_UE_FORM_REST_SUBMISSION = CONTENT_ROOT
+        + "/formContainer-ue-form-rest-submission";
+    private static final String PATH_CC_FORM_SPREADSHEET_SUBMISSION = CONTENT_ROOT
+        + "/formContainer-cc-form-spreadsheet-submission";
+    private static final String PATH_CC_FORM_REST_SUBMISSION = CONTENT_ROOT
+        + "/formContainer-cc-form-rest-submission";
 
+    private static final String PATH_FORM_WITHOUT_FIELDTYPE = CONTENT_ROOT + "/formcontainerv2-without-fieldtype";
     private static final String PATH_FORM_WITH_AUTO_SAVE = CONTENT_ROOT + "/formcontainerv2WithAutoSave";
     private static final String PATH_FORM_1_WITHOUT_REDIRECT = CONTENT_ROOT + "/formcontainerv2WithoutRedirect";
     private static final String CONTENT_FORM_WITHOUT_PREFILL_ROOT = "/content/forms/af/formWithoutPrefill";
@@ -91,6 +112,8 @@ public class FormContainerImplTest {
         + "/jcr:content/root/sitecontainer/formcontainer";
 
     protected static final String AF_PATH = "/content/forms/af/testAf";
+    private static final String SS_EMAIL = "email";
+    private static final String SS_SPREADSHEET = "spreadsheet";
 
     private final AemContext context = FormsCoreComponentTestContext.newAemContext();
 
@@ -621,4 +644,145 @@ public AllowedComponentsExporter getExportedAllowedComponents() {
         assertNull(formContainer1.getAutoSaveConfig());
     }
 
+    private void setMockClientBuilderFactory(FormContainerImpl formContainer) {
+        HttpClientBuilderFactory mockClientBuilderFactory = mock(HttpClientBuilderFactory.class);
+        HttpClientBuilder mockHttpClientBuilder = mock(HttpClientBuilder.class);
+        CloseableHttpClient mockHttpClient = mock(CloseableHttpClient.class);
+        CloseableHttpResponse mockResponse = mock(CloseableHttpResponse.class);
+
+        // Configure mock response with 200 status and spreadsheet in supported actions
+        when(mockResponse.getStatusLine()).thenReturn(mock(StatusLine.class));
+        when(mockResponse.getStatusLine().getStatusCode()).thenReturn(200);
+        try {
+            when(mockResponse.getEntity()).thenReturn(new StringEntity("{\"supported\":[\"spreadsheet\"]}"));
+
+            // Wire up mock chain
+            when(mockClientBuilderFactory.newBuilder()).thenReturn(mockHttpClientBuilder);
+            when(mockHttpClientBuilder.build()).thenReturn(mockHttpClient);
+            when(mockHttpClient.execute(any())).thenReturn(mockResponse);
+        } catch (Exception e) {}
+
+        // Register and inject mocks
+        context.registerService(HttpClientBuilderFactory.class, mockClientBuilderFactory);
+        Utils.setInternalState(formContainer, "clientBuilderFactory", mockClientBuilderFactory);
+    }
+
+    @Test
+    public void testJSONExportWithSubmissionAttribute() throws Exception {
+        FormContainerImpl formContainer = Utils.getComponentUnderTest(PATH_FORM_SUBMISSION_VIEW, FormContainerImpl.class, context);
+        setMockClientBuilderFactory(formContainer);
+        context.request().setAttribute(FormConstants.X_ADOBE_FORM_DEFINITION, FormConstants.FORM_DEFINITION_SUBMISSION);
+        ObjectMapper mapper = new ObjectMapper();
+        String json = mapper.writerWithView(Views.Publish.class).writeValueAsString(formContainer);
+        JsonNode formJson = mapper.readTree(json);
+        JsonNode submitJson = formJson.get("properties").get("fd:submit");
+        assertTrue("Should have fd:submit at top level", submitJson != null);
+        assertEquals("fd/af/components/guidesubmittype/franklin/spreadsheet", submitJson.get("actionType").asText());
+        assertEquals("test@example.com", submitJson.get(SS_EMAIL).get("mailto").get(0).asText());
+        assertEquals("sender@example.com", submitJson.get(SS_EMAIL).get("from").asText());
+        assertEquals("Test Subject", submitJson.get(SS_EMAIL).get("subject").asText());
+        assertEquals("spreadsheet", submitJson.get("actionName").asText());
+        assertEquals("http://localhost/testurl", submitJson.get(SS_SPREADSHEET).get("spreadsheetUrl").asText());
+
+        Utils.testJSONExport(formContainer,
+            Utils.getTestExporterJSONPath(BASE, "withSubmissionAttribute"));
+    }
+
+    @Test
+    public void testJSONExportWithSubmissionHeader() throws Exception {
+        FormContainerImpl formContainer = Utils.getComponentUnderTest(PATH_FORM_SUBMISSION_VIEW,
+            FormContainerImpl.class, context);
+        setMockClientBuilderFactory(formContainer);
+        context.request().setHeader(FormConstants.X_ADOBE_FORM_DEFINITION, FormConstants.FORM_DEFINITION_SUBMISSION);
+        ObjectMapper mapper = new ObjectMapper();
+        String json = mapper.writerWithView(Views.Publish.class).writeValueAsString(formContainer);
+        JsonNode formJson = mapper.readTree(json);
+        JsonNode submitJson = formJson.get("properties").get("fd:submit");
+        assertTrue("Should have fd:submit at top level", submitJson != null);
+        assertEquals("fd/af/components/guidesubmittype/franklin/spreadsheet", submitJson.get("actionType").asText());
+        assertEquals("test@example.com", submitJson.get(SS_EMAIL).get("mailto").get(0).asText());
+        assertEquals("sender@example.com", submitJson.get(SS_EMAIL).get("from").asText());
+        assertEquals("Test Subject", submitJson.get(SS_EMAIL).get("subject").asText());
+        assertEquals("spreadsheet", submitJson.get("actionName").asText());
+        assertEquals("http://localhost/testurl", submitJson.get(SS_SPREADSHEET).get("spreadsheetUrl").asText());
+
+        Utils.testJSONExport(formContainer,
+            Utils.getTestExporterJSONPath(BASE, "withSubmissionAttribute"));
+    }
+
+    @Test
+    public void testJSONExportWithoutSubmissionAttribute() throws Exception {
+        FormContainerImpl formContainer = Utils.getComponentUnderTest(PATH_FORM_SUBMISSION_VIEW,
+            FormContainerImpl.class, context);
+        setMockClientBuilderFactory(formContainer);
+        ObjectMapper mapper = new ObjectMapper();
+        String json = mapper.writerWithView(Views.Publish.class).writeValueAsString(formContainer);
+        JsonNode formJson = mapper.readTree(json);
+        assertNull("Should not have fd:submit at top level", formJson.get("properties").get("fd:submit"));
+        Utils.testJSONExport(formContainer,
+            Utils.getTestExporterJSONPath(BASE, "withoutSubmissionAttribute"));
+    }
+
+    @Test
+    public void testActionForUEFormSpreadsheetSubmission() throws Exception {
+        FormContainerImpl formContainer = Utils.getComponentUnderTest(PATH_UE_FORM_WITH_SPREADSHEET_SUBMISSION,
+            FormContainerImpl.class, context);
+        setMockClientBuilderFactory(formContainer);
+        ObjectMapper mapper = new ObjectMapper();
+        String json = mapper.writerWithView(Views.Publish.class).writeValueAsString(formContainer);
+        JsonNode formJson = mapper.readTree(json);
+        assertEquals("action should be empty for ue form with submit action supported via submission service", "",
+            formJson.get("action").asText());
+        Utils.testJSONExport(formContainer,
+            Utils.getTestExporterJSONPath(BASE, PATH_UE_FORM_WITH_SPREADSHEET_SUBMISSION));
+    }
+
+    @Test
+    public void testActionForUEFormRestSubmission() throws Exception {
+        FormContainerImpl formContainer = Utils.getComponentUnderTest(PATH_UE_FORM_REST_SUBMISSION,
+            FormContainerImpl.class, context);
+        setMockClientBuilderFactory(formContainer);
+        ObjectMapper mapper = new ObjectMapper();
+        String json = mapper.writerWithView(Views.Publish.class).writeValueAsString(formContainer);
+        JsonNode formJson = mapper.readTree(json);
+        assertTrue("action should not be empty for ue form with submit action not supported via submission service",
+            formJson.get("action").asText().length() > 0);
+        Utils.testJSONExport(formContainer, Utils.getTestExporterJSONPath(BASE, PATH_UE_FORM_REST_SUBMISSION));
+    }
+
+    @Test
+    public void testActionForCCFormSpreadsheetSubmission() throws Exception {
+        FormContainerImpl formContainer = Utils.getComponentUnderTest(PATH_CC_FORM_SPREADSHEET_SUBMISSION,
+            FormContainerImpl.class, context);
+        setMockClientBuilderFactory(formContainer);
+        ObjectMapper mapper = new ObjectMapper();
+        String json = mapper.writerWithView(Views.Publish.class).writeValueAsString(formContainer);
+        JsonNode formJson = mapper.readTree(json);
+        String action = formJson.get("action").asText();
+        String[] actionParts = action.split("/");
+        String lastPart = actionParts[actionParts.length - 1];
+        String decodedAction = new String(Base64.getDecoder().decode(lastPart));
+        assertTrue(
+            "action should end with .model.json for cc forms for submit action  supported via submission service",
+            decodedAction.endsWith(".model.json"));
+        Utils.testJSONExport(formContainer, Utils.getTestExporterJSONPath(BASE, PATH_CC_FORM_SPREADSHEET_SUBMISSION));
+    }
+
+    @Test
+    public void testActionForCCFormRestSubmission() throws Exception {
+        FormContainerImpl formContainer = Utils.getComponentUnderTest(PATH_CC_FORM_REST_SUBMISSION,
+            FormContainerImpl.class, context);
+        setMockClientBuilderFactory(formContainer);
+        ObjectMapper mapper = new ObjectMapper();
+        String json = mapper.writerWithView(Views.Publish.class).writeValueAsString(formContainer);
+        JsonNode formJson = mapper.readTree(json);
+        String action = formJson.get("action").asText();
+        String[] actionParts = action.split("/");
+        String lastPart = actionParts[actionParts.length - 1];
+        String decodedAction = new String(Base64.getDecoder().decode(lastPart));
+        assertTrue(
+            "action should notend with .model.json for cc forms for submit action not supported via submission service",
+            !decodedAction.endsWith(".model.json"));
+        Utils.testJSONExport(formContainer, Utils.getTestExporterJSONPath(BASE, PATH_CC_FORM_REST_SUBMISSION));
+    }
 }
diff --git a/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-cc-form-rest-submission.json b/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-cc-form-rest-submission.json
new file mode 100644
index 0000000000..893d96c43e
--- /dev/null
+++ b/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-cc-form-rest-submission.json
@@ -0,0 +1,57 @@
+{
+    "id": "L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "fieldType": "form",
+    "lang": "en",
+    "title": "uesprintdemo",
+    "properties": {
+        "themeRef": "",
+        "fd:path": "/content/forms/af/demo/jcr:content/formContainer-cc-form-rest-submission",
+        "fd:schemaType": "BASIC",
+        "fd:isHamburgerMenuEnabled": false,
+        "fd:roleAttribute": null,
+        "fd:formDataEnabled": false,
+        "fd:customFunctionsUrl": "/adobe/forms/af/customfunctions/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+        "fd:dataUrl": "/adobe/forms/af/data/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw=="
+    },
+    "action": "/adobe/forms/af/submit/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "events": {
+        "custom:setProperty": [
+            "$event.payload"
+        ]
+    },
+    ":itemsOrder": [
+        "textinput"
+    ],
+    ":items": {
+        "textinput": {
+            "id": "textinput-037dbdee3a",
+            "fieldType": "text-input",
+            "name": "abc",
+            "visible": false,
+            "description": "dummy",
+            "type": "string",
+            "label": {
+                "value": "def",
+                "visible": true
+            },
+            "properties": {
+                "fd:dor": {
+                    "dorExclusion": false
+                },
+                "fd:path": "/content/forms/af/demo/jcr:content/formContainer-cc-form-rest-submission/textinput"
+            },
+            "events": {
+                "custom:setProperty": [
+                    "$event.payload"
+                ]
+            },
+            ":type": "core/fd/components/form/textinput/v1/textinput"
+        }
+    },
+    "metadata": {
+        "grammar": "json-formula-1.0.0",
+        "version": "1.0.0"
+    },
+    "adaptiveform": "0.14.2",
+    ":type": "fd/components/form/v1/form"
+}
\ No newline at end of file
diff --git a/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-cc-form-spreadsheet-submission.json b/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-cc-form-spreadsheet-submission.json
new file mode 100644
index 0000000000..4116684a68
--- /dev/null
+++ b/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-cc-form-spreadsheet-submission.json
@@ -0,0 +1,57 @@
+{
+    "id": "L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "fieldType": "form",
+    "lang": "en",
+    "title": "uesprintdemo",
+    "properties": {
+        "themeRef": "",
+        "fd:path": "/content/forms/af/demo/jcr:content/formContainer-cc-form-spreadsheet-submission",
+        "fd:schemaType": "BASIC",
+        "fd:isHamburgerMenuEnabled": false,
+        "fd:roleAttribute": null,
+        "fd:formDataEnabled": false,
+        "fd:customFunctionsUrl": "/adobe/forms/af/customfunctions/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+        "fd:dataUrl": "/adobe/forms/af/data/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw=="
+    },
+    "action": "https://forms.adobe.com/adobe/forms/af/submit/L2NvbnRlbnQvZm9ybXMvYWYvZGVtby9qY3I6Y29udGVudC9mb3JtQ29udGFpbmVyLWNjLWZvcm0tc3ByZWFkc2hlZXQtc3VibWlzc2lvbi5tb2RlbC5qc29u",
+    "events": {
+        "custom:setProperty": [
+            "$event.payload"
+        ]
+    },
+    ":itemsOrder": [
+        "textinput"
+    ],
+    ":items": {
+        "textinput": {
+            "id": "textinput-0dca4c4bc1",
+            "fieldType": "text-input",
+            "name": "abc",
+            "visible": false,
+            "description": "dummy",
+            "type": "string",
+            "label": {
+                "value": "def",
+                "visible": true
+            },
+            "properties": {
+                "fd:dor": {
+                    "dorExclusion": false
+                },
+                "fd:path": "/content/forms/af/demo/jcr:content/formContainer-cc-form-spreadsheet-submission/textinput"
+            },
+            "events": {
+                "custom:setProperty": [
+                    "$event.payload"
+                ]
+            },
+            ":type": "core/fd/components/form/textinput/v1/textinput"
+        }
+    },
+    "metadata": {
+        "grammar": "json-formula-1.0.0",
+        "version": "1.0.0"
+    },
+    "adaptiveform": "0.14.2",
+    ":type": "fd/components/form/v1/form"
+}
\ No newline at end of file
diff --git a/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-ue-form-rest-submission.json b/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-ue-form-rest-submission.json
new file mode 100644
index 0000000000..80b9a45301
--- /dev/null
+++ b/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-ue-form-rest-submission.json
@@ -0,0 +1,57 @@
+{
+    "id": "L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "fieldType": "form",
+    "lang": "en",
+    "title": "uesprintdemo",
+    "action": "/adobe/forms/af/submit/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "properties": {
+        "themeRef": "",
+        "fd:path": "/content/forms/af/demo/jcr:content/formContainer-ue-form-rest-submission",
+        "fd:schemaType": "BASIC",
+        "fd:isHamburgerMenuEnabled": false,
+        "fd:roleAttribute": null,
+        "fd:formDataEnabled": false,
+        "fd:customFunctionsUrl": "/adobe/forms/af/customfunctions/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+        "fd:dataUrl": "/adobe/forms/af/data/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw=="
+    },
+    "events": {
+        "custom:setProperty": [
+            "$event.payload"
+        ]
+    },
+    ":itemsOrder": [
+        "textinput"
+    ],
+    ":items": {
+        "textinput": {
+            "id": "textinput-5c60b85622",
+            "fieldType": "text-input",
+            "name": "abc",
+            "visible": false,
+            "description": "dummy",
+            "type": "string",
+            "label": {
+                "value": "def",
+                "visible": true
+            },
+            "properties": {
+                "fd:dor": {
+                    "dorExclusion": false
+                },
+                "fd:path": "/content/forms/af/demo/jcr:content/formContainer-ue-form-rest-submission/textinput"
+            },
+            "events": {
+                "custom:setProperty": [
+                    "$event.payload"
+                ]
+            },
+            ":type": "core/fd/components/form/textinput/v1/textinput"
+        }
+    },
+    "metadata": {
+        "version": "1.0.0",
+        "grammar": "json-formula-1.0.0"
+    },
+    "adaptiveform": "0.14.2",
+    ":type": "fd/franklin/components/form/v1/form"
+}
\ No newline at end of file
diff --git a/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-ue-form-spreadsheet-submission.json b/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-ue-form-spreadsheet-submission.json
new file mode 100644
index 0000000000..34b7d94e2b
--- /dev/null
+++ b/bundles/af-core/src/test/resources/form/formcontainer/exporter-formContainer-ue-form-spreadsheet-submission.json
@@ -0,0 +1,57 @@
+{
+    "id": "L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "fieldType": "form",
+    "lang": "en",
+    "title": "uesprintdemo",
+    "action": "",
+    "properties": {
+        "themeRef": "",
+        "fd:path": "/content/forms/af/demo/jcr:content/formContainer-ue-form-spreadsheet-submission",
+        "fd:schemaType": "BASIC",
+        "fd:isHamburgerMenuEnabled": false,
+        "fd:roleAttribute": null,
+        "fd:formDataEnabled": false,
+        "fd:customFunctionsUrl": "/adobe/forms/af/customfunctions/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+        "fd:dataUrl": "/adobe/forms/af/data/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw=="
+    },
+    "events": {
+        "custom:setProperty": [
+            "$event.payload"
+        ]
+    },
+    ":itemsOrder": [
+        "textinput"
+    ],
+    ":items": {
+        "textinput": {
+            "id": "textinput-6feb04776f",
+            "fieldType": "text-input",
+            "name": "abc",
+            "visible": false,
+            "description": "dummy",
+            "type": "string",
+            "label": {
+                "value": "def",
+                "visible": true
+            },
+            "properties": {
+                "fd:dor": {
+                    "dorExclusion": false
+                },
+                "fd:path": "/content/forms/af/demo/jcr:content/formContainer-ue-form-spreadsheet-submission/textinput"
+            },
+            "events": {
+                "custom:setProperty": [
+                    "$event.payload"
+                ]
+            },
+            ":type": "core/fd/components/form/textinput/v1/textinput"
+        }
+    },
+    "metadata": {
+        "version": "1.0.0",
+        "grammar": "json-formula-1.0.0"
+    },
+    "adaptiveform": "0.14.2",
+    ":type": "fd/franklin/components/form/v1/form"
+}
\ No newline at end of file
diff --git a/bundles/af-core/src/test/resources/form/formcontainer/exporter-withSubmissionAttribute.json b/bundles/af-core/src/test/resources/form/formcontainer/exporter-withSubmissionAttribute.json
new file mode 100644
index 0000000000..8f8fa38d29
--- /dev/null
+++ b/bundles/af-core/src/test/resources/form/formcontainer/exporter-withSubmissionAttribute.json
@@ -0,0 +1,73 @@
+{
+    "id": "L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "fieldType": "form",
+    "lang": "en",
+    "title": "afv2",
+    "action": "https://forms.adobe.com/adobe/forms/af/submit/L2NvbnRlbnQvZm9ybXMvYWYvZGVtby9qY3I6Y29udGVudC9mb3JtY29udGFpbmVyLXN1Ym1pc3Npb25WaWV3Lm1vZGVsLmpzb24=",
+    "properties": {
+        "themeRef": "/libs/fd/af/themes/canvas",
+        "schemaType": "none",
+        "useExternalEmailTemplate": "true",
+        "fd:path": "/content/forms/af/demo/jcr:content/formcontainer-submissionView",
+        "fd:schemaType": "BASIC",
+        "fd:isHamburgerMenuEnabled": false,
+        "fd:roleAttribute": null,
+        "fd:formDataEnabled": false,
+        "fd:customFunctionsUrl": "/adobe/forms/af/customfunctions/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+        "fd:dataUrl": "/adobe/forms/af/data/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+        "fd:submit": {
+            "spreadsheet": {
+                "spreadsheetUrl": "http://localhost/testurl"
+            },
+            "email": {
+                "subject": "Test Subject",
+                "mailto": [
+                    "test@example.com"
+                ],
+                "from": "sender@example.com"
+            },
+            "actionType": "fd/af/components/guidesubmittype/franklin/spreadsheet",
+            "actionName": "spreadsheet"
+        }
+    },
+    "events": {
+        "custom:setProperty": [
+            "$event.payload"
+        ]
+    },
+    ":itemsOrder": [
+        "textinput"
+    ],
+    "metadata": {
+        "grammar": "json-formula-1.0.0",
+        "version": "1.0.0"
+    },
+    "adaptiveform": "0.14.2",
+    ":items": {
+        "textinput": {
+            "id": "textinput-5bac58a9c9",
+            "fieldType": "text-input",
+            "name": "abc",
+            "visible": false,
+            "description": "dummy",
+            "type": "string",
+            "label": {
+                "value": "def",
+                "visible": true
+            },
+            "properties": {
+                "fd:dor": {
+                    "dorExclusion": false
+                },
+                "fd:path": "/content/forms/af/demo/jcr:content/formcontainer-submissionView/textinput"
+            },
+            "events": {
+                "custom:setProperty": [
+                    "$event.payload"
+                ]
+            },
+            ":type": "core/fd/components/form/textinput/v1/textinput"
+        }
+    },
+    ":type": "forms-components-examples/components/form/container"
+}
\ No newline at end of file
diff --git a/bundles/af-core/src/test/resources/form/formcontainer/exporter-withoutSubmissionAttribute.json b/bundles/af-core/src/test/resources/form/formcontainer/exporter-withoutSubmissionAttribute.json
new file mode 100644
index 0000000000..fee514c7fe
--- /dev/null
+++ b/bundles/af-core/src/test/resources/form/formcontainer/exporter-withoutSubmissionAttribute.json
@@ -0,0 +1,59 @@
+{
+    "id": "L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "fieldType": "form",
+    "lang": "en",
+    "title": "afv2",
+    "properties": {
+        "themeRef": "/libs/fd/af/themes/canvas",
+        "schemaType": "none",
+        "useExternalEmailTemplate": "true",
+        "fd:path": "/content/forms/af/demo/jcr:content/formcontainer-submissionView",
+        "fd:schemaType": "BASIC",
+        "fd:isHamburgerMenuEnabled": false,
+        "fd:roleAttribute": null,
+        "fd:formDataEnabled": false,
+        "fd:customFunctionsUrl": "/adobe/forms/af/customfunctions/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+        "fd:dataUrl": "/adobe/forms/af/data/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw=="
+    },
+    "action": "https://forms.adobe.com/adobe/forms/af/submit/L2NvbnRlbnQvZm9ybXMvYWYvZGVtby9qY3I6Y29udGVudC9mb3JtY29udGFpbmVyLXN1Ym1pc3Npb25WaWV3Lm1vZGVsLmpzb24=",
+    "events": {
+        "custom:setProperty": [
+            "$event.payload"
+        ]
+    },
+    ":itemsOrder": [
+        "textinput"
+    ],
+    ":items": {
+        "textinput": {
+            "id": "textinput-5bac58a9c9",
+            "fieldType": "text-input",
+            "name": "abc",
+            "visible": false,
+            "description": "dummy",
+            "type": "string",
+            "label": {
+                "value": "def",
+                "visible": true
+            },
+            "properties": {
+                "fd:dor": {
+                    "dorExclusion": false
+                },
+                "fd:path": "/content/forms/af/demo/jcr:content/formcontainer-submissionView/textinput"
+            },
+            "events": {
+                "custom:setProperty": [
+                    "$event.payload"
+                ]
+            },
+            ":type": "core/fd/components/form/textinput/v1/textinput"
+        }
+    },
+    "metadata": {
+        "version": "1.0.0",
+        "grammar": "json-formula-1.0.0"
+    },
+    "adaptiveform": "0.14.2",
+    ":type": "forms-components-examples/components/form/container"
+}
\ No newline at end of file
diff --git a/bundles/af-core/src/test/resources/form/formcontainer/test-page-content.json b/bundles/af-core/src/test/resources/form/formcontainer/test-page-content.json
index 0d1052b68d..5b999c8856 100644
--- a/bundles/af-core/src/test/resources/form/formcontainer/test-page-content.json
+++ b/bundles/af-core/src/test/resources/form/formcontainer/test-page-content.json
@@ -82,6 +82,134 @@
         "visible" : false,
         "customProp": "customPropValue"
       }
+    },
+    "formcontainer-submissionView": {
+      "jcr:primaryType": "nt:unstructured",
+      "thankYouOption": "page",
+      "subject": "Test Subject",
+      "thankYouMessage": "<p>Thank you for submitting the form.</p>\r\n",
+      "jcr:lastModifiedBy": "admin",
+      "mailto": [
+        "test@example.com"
+      ],
+      "fd:version": "2.1",
+      "schemaType": "none",
+      "specVersion": "0.14.2",
+      "useExternalEmailTemplate": "true",
+      "from": "sender@example.com",
+      "title": "afv2",
+      "jcr:lastModified": "Wed Mar 05 2025 11:19:02 GMT+0530",
+      "themeRef": "/libs/fd/af/themes/canvas",
+      "sling:resourceType": "forms-components-examples/components/form/container",
+      "fieldType": "form",
+      "spreadsheetUrl": "http://localhost/testurl",
+      "textIsRich": "true",
+      "actionName": "spreadsheet",
+      "textinput": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "core/fd/components/form/textinput/v1/textinput",
+        "name": "abc",
+        "jcr:title": "def",
+        "hideTitle": false,
+        "description": "dummy",
+        "fieldType": "text-input",
+        "visible": false
+      },
+      "actionType": "fd/af/components/guidesubmittype/franklin/spreadsheet"
+    },
+    "formContainer-ue-form-spreadsheet-submission": {
+      "jcr:primaryType": "nt:unstructured",
+      "thankYouOption": "page",
+      "jcr:lastModifiedBy": "ddewanji@adobe.com",
+      "fd:version": "2.1",
+      "title": "uesprintdemo",
+      "jcr:lastModified": "Sat Mar 08 2025 06:56:53 GMT+0000",
+      "themeRef": "",
+      "sling:resourceType": "fd/franklin/components/form/v1/form",
+      "fieldType": "form",
+      "spreadsheetUrl": "https://adobe.sharepoint.com/:x:/r/sites/AFB/Shared%20Documents/afb/website/testcases/submitconfigfinal.xlsx?d=w1b0e4e171eea4f23b299603feaecf23b&csf=1&web=1&e=4fjqT1",
+      "actionName": "spreadsheet",
+      "textinput": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "core/fd/components/form/textinput/v1/textinput",
+        "name": "abc",
+        "jcr:title": "def",
+        "hideTitle": false,
+        "description": "dummy",
+        "fieldType": "text-input",
+        "visible": false
+      },
+      "actionType": "fd/af/components/guidesubmittype/franklin/spreadsheet"
+    },
+    "formContainer-ue-form-rest-submission": {
+      "jcr:primaryType": "nt:unstructured",
+      "thankYouOption": "page",
+      "jcr:lastModifiedBy": "ddewanji@adobe.com",
+      "fd:version": "2.1",
+      "title": "uesprintdemo",
+      "jcr:lastModified": "Sat Mar 08 2025 06:56:53 GMT+0000",
+      "themeRef": "",
+      "sling:resourceType": "fd/franklin/components/form/v1/form",
+      "fieldType": "form",
+      "actionName": "rest",
+      "textinput": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "core/fd/components/form/textinput/v1/textinput",
+        "name": "abc",
+        "jcr:title": "def",
+        "hideTitle": false,
+        "description": "dummy",
+        "fieldType": "text-input",
+        "visible": false
+      },
+      "actionType": "fd/af/components/guidesubmittype/rest"
+    },
+    "formContainer-cc-form-spreadsheet-submission": {
+      "jcr:primaryType": "nt:unstructured",
+      "thankYouOption": "page",
+      "jcr:lastModifiedBy": "ddewanji@adobe.com",
+      "fd:version": "2.1",
+      "title": "uesprintdemo",
+      "jcr:lastModified": "Sat Mar 08 2025 06:56:53 GMT+0000",
+      "themeRef": "",
+      "sling:resourceType": "fd/components/form/v1/form",
+      "fieldType": "form",
+      "spreadsheetUrl": "https://adobe.sharepoint.com/:x:/r/sites/AFB/Shared%20Documents/afb/website/testcases/submitconfigfinal.xlsx?d=w1b0e4e171eea4f23b299603feaecf23b&csf=1&web=1&e=4fjqT1",
+      "actionName": "spreadsheet",
+      "textinput": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "core/fd/components/form/textinput/v1/textinput",
+        "name": "abc",
+        "jcr:title": "def",
+        "hideTitle": false,
+        "description": "dummy",
+        "fieldType": "text-input",
+        "visible": false
+      },
+      "actionType": "fd/af/components/guidesubmittype/franklin/spreadsheet"
+    },
+    "formContainer-cc-form-rest-submission": {
+      "jcr:primaryType": "nt:unstructured",
+      "thankYouOption": "page",
+      "jcr:lastModifiedBy": "ddewanji@adobe.com",
+      "fd:version": "2.1",
+      "title": "uesprintdemo",
+      "jcr:lastModified": "Sat Mar 08 2025 06:56:53 GMT+0000",
+      "themeRef": "",
+      "sling:resourceType": "fd/components/form/v1/form",
+      "fieldType": "form",
+      "actionName": "rest",
+      "textinput": {
+        "jcr:primaryType": "nt:unstructured",
+        "sling:resourceType": "core/fd/components/form/textinput/v1/textinput",
+        "name": "abc",
+        "jcr:title": "def",
+        "hideTitle": false,
+        "description": "dummy",
+        "fieldType": "text-input",
+        "visible": false
+      },
+      "actionType": "fd/af/components/guidesubmittype/rest"
     }
   }
 }
\ No newline at end of file


Reviews:
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-05T10:06:35Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T11:28:40Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-05T12:43:42Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T15:21:29Z
user: login: nit23uec
body: There has been a parallel discussion of jncluding the submit props in the properties API. @vaibhav2601 has been working in the same. It should be thought through if we want to have them as form definition or form properties. Btw whats the runtime use for it.. is it documented anywhere?
If there's a valid use case then both of the formats should be consistent. 
state: CHANGES_REQUESTED
author_association: COLLABORATOR
submitted_at: 2025-03-05T19:34:38Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-06T05:23:21Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-06T05:29:56Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-06T05:30:29Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-08T08:37:25Z
user: login: vdua
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-10T06:26:52Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T06:55:18Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T08:45:47Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T08:45:57Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T08:47:05Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T08:48:04Z
user: login: rismehta
body: check comments
state: CHANGES_REQUESTED
author_association: COLLABORATOR
submitted_at: 2025-03-10T09:10:23Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T09:27:09Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T09:27:21Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T09:27:30Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T09:27:57Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T09:28:07Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T20:41:21Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T20:41:45Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T20:41:53Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T20:42:15Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T20:42:40Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-10T21:17:19Z
user: login: vdua
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-11T02:14:33Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-11T04:16:29Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-11T04:17:15Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-11T06:13:38Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-11T06:14:33Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-11T07:13:16Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-11T07:13:48Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-11T10:09:32Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-11T11:17:24Z
user: login: rismehta
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-11T11:17:48Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-11T12:23:24Z
user: login: deepprakash345
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-11T12:23:46Z

Review comments:
diff_hunk: @@ -131,6 +131,26 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
     @Default(values = DEFAULT_FORMS_SPEC_VERSION)
     private String specVersion;
 
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String actionType;
+
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String[] mailto;
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: Wouldn't mailTo etc anyways come, since today these are exposed in the default json as well. We should ideally add this to the blacklist from the model json 
created_at: 2025-03-05T10:06:35Z
author_association: COLLABORATOR
diff_hunk: @@ -131,6 +131,26 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
     @Default(values = DEFAULT_FORMS_SPEC_VERSION)
     private String specVersion;
 
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String actionType;
+
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String[] mailto;
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: I didn't do that because till now they were exposed via the form model api in customProperties. So removing them will be a backward incompatible change.

I can mark them as reserved properties.  Kindly suggest if i should go ahead and do that
cc:- @vdua 
created_at: 2025-03-05T11:28:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -131,6 +131,26 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
     @Default(values = DEFAULT_FORMS_SPEC_VERSION)
     private String specVersion;
 
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String actionType;
+
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String[] mailto;
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: The issue with the current approach is that it exposes certain properties specific to submit actions in sling model, which is confusing. Instead, we should expose a generic property, such as submitType, using the ReservedProperty route, while custom properties should continue to be handled as they were previously (under properties object).

If we need to bring the OOTB submit properties under fd:submitType namespace, then we should do it here rather than injecting them in sling model, https://github.com/adobe/aem-core-forms-components/blob/master/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/util/AbstractFormComponentImpl.java#L278-L298
created_at: 2025-03-05T12:43:42Z
author_association: COLLABORATOR
diff_hunk: @@ -131,6 +131,26 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
     @Default(values = DEFAULT_FORMS_SPEC_VERSION)
     private String specVersion;
 
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String actionType;
+
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String[] mailto;
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: @rismehta , as per our decision in the last call with you and varun, we wanted to introduce a namespace "fd:submit" in the top level of headless json and not inside "properties" namespace. 

 If the concern is that we are introducing properties like mailTo, from etc in the sling model, then isn't it a better way that using jcr apis to read resource valuemaps. 
 
 In any case the properties are marked private and jsonIgnore and no getter apis are exposed over them.
  
 Please let me know if you think we should read from jcr rather than introducing pvt fields in the sling model, but i am not sure about it.
 
 cc:- @vdua 
created_at: 2025-03-05T15:21:29Z
author_association: CONTRIBUTOR
diff_hunk: @@ -424,4 +443,35 @@ public AutoSaveConfiguration getAutoSaveConfig() {
         return autoSaveConfig;
     }
 
+    @Override
+    public Map<String, Object> getSubmitProperties() {
+        Map<String, Object> submitProps = new LinkedHashMap<>();
+        Map<String, String> submitActionMap = new LinkedHashMap<>();
+
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_EMAIL, FormConstants.NAME_SUBMIT_TYPE_EMAIL);
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: use the existing GuideConstants.DEFAULT_GUIDE_SUBMIT_ACTION_SERVICES
created_at: 2025-03-06T05:23:21Z
author_association: COLLABORATOR
diff_hunk: @@ -424,4 +443,35 @@ public AutoSaveConfiguration getAutoSaveConfig() {
         return autoSaveConfig;
     }
 
+    @Override
+    public Map<String, Object> getSubmitProperties() {
+        Map<String, Object> submitProps = new LinkedHashMap<>();
+        Map<String, String> submitActionMap = new LinkedHashMap<>();
+
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_EMAIL, FormConstants.NAME_SUBMIT_TYPE_EMAIL);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_SPREADSHEET, FormConstants.NAME_SUBMIT_TYPE_SPREADSHEET);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_REST, FormConstants.NAME_SUBMIT_TYPE_REST);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_FDM, FormConstants.NAME_SUBMIT_TYPE_FDM);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_AZURE_BLOB, FormConstants.NAME_SUBMIT_TYPE_AZURE_BLOB);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_ONEDRIVE, FormConstants.NAME_SUBMIT_TYPE_ONEDRIVE);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_SHAREPOINT, FormConstants.NAME_SUBMIT_TYPE_SHAREPOINT);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_AEM_WORKFLOW, FormConstants.NAME_SUBMIT_TYPE_AEM_WORKFLOW);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_POWER_AUTOMATE, FormConstants.NAME_SUBMIT_TYPE_POWER_AUTOMATE);
+
+        submitProps.put("actionType", submitActionMap.getOrDefault(actionType, actionType));
+        if (mailto != null && mailto.length > 0) {
+            submitProps.put("email_mailto", mailto);
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: Add reserved properties directly here and read the properties directly. Since we don't have getters, lets not inject them at top.
created_at: 2025-03-06T05:29:56Z
author_association: COLLABORATOR
diff_hunk: @@ -131,6 +131,26 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
     @Default(values = DEFAULT_FORMS_SPEC_VERSION)
     private String specVersion;
 
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String actionType;
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: create reserved properties for these
created_at: 2025-03-06T05:30:29Z
author_association: COLLABORATOR
diff_hunk: @@ -277,9 +294,54 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = this.getSupportedSubmitActions();
+        String resourceType = resource.getValueMap().get("sling:resourceType", String.class);
+        supportedSubmitActions = Arrays.asList("spreadsheet");
+        if (supportedSubmitActions.contains(resource.getValueMap().get(ReservedProperties.PN_SUBMIT_ACTION_NAME))) {
+            if (resourceType != null && resourceType.contains("/franklin")) {
+                return "";
+            } else {
+                return "https://forms.adobe.com" + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" +
+                    ComponentUtils.getEncodedPath(resource.getPath() + ".model.json");
+            }
+        }
         return getContextPath() + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" + getId();
     }
 
+    private List<String> getSupportedSubmitActions() {
+        String supportedSubmitActionsUrl = "https://forms.adobe.com/adobe/forms/af/supportedSubmitActions";
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: WILL CHANGE THIS URL ONCE WE HAVE THE ENDPOINT TO FETCH SUPPORTED SUBMIT ACTIONS.
created_at: 2025-03-08T08:37:25Z
author_association: CONTRIBUTOR
diff_hunk: @@ -117,14 +117,16 @@ private String getFormContainerPath(Resource resource) {
 
     public String getFormDefinition() {
         String result = null;
+        if (request != null) {
+            request.setAttribute(FormConstants.X_ADOBE_FORM_DEFINITION, FormConstants.FORM_DEFINITION_SUBMISSION);
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormStructureParserImpl.java
user: login: vdua
body: why are we setting this always ? shouldn't it be based on the header ?
created_at: 2025-03-10T06:26:51Z
author_association: COLLABORATOR
diff_hunk: @@ -117,14 +117,16 @@ private String getFormContainerPath(Resource resource) {
 
     public String getFormDefinition() {
         String result = null;
+        if (request != null) {
+            request.setAttribute(FormConstants.X_ADOBE_FORM_DEFINITION, FormConstants.FORM_DEFINITION_SUBMISSION);
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormStructureParserImpl.java
user: login: deepprakash345
body: @vdua , 
the FormStructureParser is only used via FranklinDeliveryServlet, I thought we can keep always assume this call is for publishing form, but i think this api can be used in future for generically getting the form definition so will add the change of adding the attribute only when this header is set.
created_at: 2025-03-10T06:55:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -131,6 +131,26 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
     @Default(values = DEFAULT_FORMS_SPEC_VERSION)
     private String specVersion;
 
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String actionType;
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: done
created_at: 2025-03-10T08:45:47Z
author_association: CONTRIBUTOR
diff_hunk: @@ -424,4 +443,35 @@ public AutoSaveConfiguration getAutoSaveConfig() {
         return autoSaveConfig;
     }
 
+    @Override
+    public Map<String, Object> getSubmitProperties() {
+        Map<String, Object> submitProps = new LinkedHashMap<>();
+        Map<String, String> submitActionMap = new LinkedHashMap<>();
+
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_EMAIL, FormConstants.NAME_SUBMIT_TYPE_EMAIL);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_SPREADSHEET, FormConstants.NAME_SUBMIT_TYPE_SPREADSHEET);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_REST, FormConstants.NAME_SUBMIT_TYPE_REST);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_FDM, FormConstants.NAME_SUBMIT_TYPE_FDM);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_AZURE_BLOB, FormConstants.NAME_SUBMIT_TYPE_AZURE_BLOB);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_ONEDRIVE, FormConstants.NAME_SUBMIT_TYPE_ONEDRIVE);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_SHAREPOINT, FormConstants.NAME_SUBMIT_TYPE_SHAREPOINT);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_AEM_WORKFLOW, FormConstants.NAME_SUBMIT_TYPE_AEM_WORKFLOW);
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_POWER_AUTOMATE, FormConstants.NAME_SUBMIT_TYPE_POWER_AUTOMATE);
+
+        submitProps.put("actionType", submitActionMap.getOrDefault(actionType, actionType));
+        if (mailto != null && mailto.length > 0) {
+            submitProps.put("email_mailto", mailto);
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: done
created_at: 2025-03-10T08:45:57Z
author_association: CONTRIBUTOR
diff_hunk: @@ -424,4 +443,35 @@ public AutoSaveConfiguration getAutoSaveConfig() {
         return autoSaveConfig;
     }
 
+    @Override
+    public Map<String, Object> getSubmitProperties() {
+        Map<String, Object> submitProps = new LinkedHashMap<>();
+        Map<String, String> submitActionMap = new LinkedHashMap<>();
+
+        submitActionMap.put(FormConstants.RT_SUBMIT_TYPE_EMAIL, FormConstants.NAME_SUBMIT_TYPE_EMAIL);
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: DONE, Created properties in cc for now as forms-sdk release can't be done right now. Had this discussion on slack
created_at: 2025-03-10T08:47:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -131,6 +131,26 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
     @Default(values = DEFAULT_FORMS_SPEC_VERSION)
     private String specVersion;
 
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String actionType;
+
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
+    @JsonIgnore
+    private String[] mailto;
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: Resolving this as we decided to have the fd:submit namespace in Submission view and only when a certain header is passed.
created_at: 2025-03-10T08:48:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -29,4 +29,6 @@ public static class Publish {}
      */
     public static class Author extends Publish {}
 
+    public static class Submission extends Publish {}
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/views/Views.java
user: login: rismehta
body: Please add java doc for this. The reason for the creation of this View.
created_at: 2025-03-10T09:03:15Z
author_association: COLLABORATOR
diff_hunk: @@ -277,9 +294,54 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = this.getSupportedSubmitActions();
+        String resourceType = resource.getValueMap().get("sling:resourceType", String.class);
+        supportedSubmitActions = Arrays.asList("spreadsheet");
+        if (supportedSubmitActions.contains(resource.getValueMap().get(ReservedProperties.PN_SUBMIT_ACTION_NAME))) {
+            if (resourceType != null && resourceType.contains("/franklin")) {
+                return "";
+            } else {
+                return "https://forms.adobe.com" + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" +
+                    ComponentUtils.getEncodedPath(resource.getPath() + ".model.json");
+            }
+        }
         return getContextPath() + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" + getId();
     }
 
+    private List<String> getSupportedSubmitActions() {
+        String supportedSubmitActionsUrl = "https://forms.adobe.com/adobe/forms/af/supportedSubmitActions";
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: Can we move this to some other function in ComponentUtils ? I would want the sling model code to be short
created_at: 2025-03-10T09:05:59Z
author_association: COLLABORATOR
diff_hunk: @@ -244,4 +245,13 @@ public static boolean isFragmentComponent(Resource resource) {
         return resource != null && resource.getValueMap().get(FormConstants.PROP_FRAGMENT_PATH, String.class) != null;
     }
 
+    public static boolean shouldIncludeSubmitProperties(SlingHttpServletRequest request) {
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/util/ComponentUtils.java
user: login: rismehta
body: Please add java doc
created_at: 2025-03-10T09:08:24Z
author_association: COLLABORATOR
diff_hunk: @@ -82,6 +82,156 @@
         "visible" : false,
         "customProp": "customPropValue"
       }
+    },
+    "formcontainer-submissionView": {
path: bundles/af-core/src/test/resources/form/formcontainer/test-page-content.json
user: login: rismehta
body: Where are the exporter test for these, I want to check the model json being exported, can you write that as well
created_at: 2025-03-10T09:09:06Z
author_association: COLLABORATOR
diff_hunk: @@ -158,6 +158,16 @@ private ReservedProperties() {
     public static final String PN_EXCLUDE_FROM_DOR = "excludeFromDor";
     public static final String PN_MANDATORY = "mandatory";
     public static final String PN_HTML_ELEMENT_TYPE_V2 = "fd:htmlelementType";
+
+    public static final String PN_SUBMIT_ACTION_TYPE = "actionType";
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java
user: login: rismehta
body: Please group all submission-related properties together, preferably at the end, and wrap the code with comments indicating the start and end of submission properties.
created_at: 2025-03-10T09:10:17Z
author_association: COLLABORATOR
diff_hunk: @@ -82,6 +82,156 @@
         "visible" : false,
         "customProp": "customPropValue"
       }
+    },
+    "formcontainer-submissionView": {
path: bundles/af-core/src/test/resources/form/formcontainer/test-page-content.json
user: login: deepprakash345
body: Its in FormContainerImplTest @rismehta 
created_at: 2025-03-10T09:27:09Z
author_association: CONTRIBUTOR
diff_hunk: @@ -29,4 +29,6 @@ public static class Publish {}
      */
     public static class Author extends Publish {}
 
+    public static class Submission extends Publish {}
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/views/Views.java
user: login: deepprakash345
body: Sure
created_at: 2025-03-10T09:27:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -244,4 +245,13 @@ public static boolean isFragmentComponent(Resource resource) {
         return resource != null && resource.getValueMap().get(FormConstants.PROP_FRAGMENT_PATH, String.class) != null;
     }
 
+    public static boolean shouldIncludeSubmitProperties(SlingHttpServletRequest request) {
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/util/ComponentUtils.java
user: login: deepprakash345
body: Sure
created_at: 2025-03-10T09:27:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -277,9 +294,54 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = this.getSupportedSubmitActions();
+        String resourceType = resource.getValueMap().get("sling:resourceType", String.class);
+        supportedSubmitActions = Arrays.asList("spreadsheet");
+        if (supportedSubmitActions.contains(resource.getValueMap().get(ReservedProperties.PN_SUBMIT_ACTION_NAME))) {
+            if (resourceType != null && resourceType.contains("/franklin")) {
+                return "";
+            } else {
+                return "https://forms.adobe.com" + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" +
+                    ComponentUtils.getEncodedPath(resource.getPath() + ".model.json");
+            }
+        }
         return getContextPath() + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" + getId();
     }
 
+    private List<String> getSupportedSubmitActions() {
+        String supportedSubmitActionsUrl = "https://forms.adobe.com/adobe/forms/af/supportedSubmitActions";
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: Ok @rismehta , will move this
created_at: 2025-03-10T09:27:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -158,6 +158,16 @@ private ReservedProperties() {
     public static final String PN_EXCLUDE_FROM_DOR = "excludeFromDor";
     public static final String PN_MANDATORY = "mandatory";
     public static final String PN_HTML_ELEMENT_TYPE_V2 = "fd:htmlelementType";
+
+    public static final String PN_SUBMIT_ACTION_TYPE = "actionType";
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java
user: login: deepprakash345
body: Sure
created_at: 2025-03-10T09:28:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -158,6 +158,16 @@ private ReservedProperties() {
     public static final String PN_EXCLUDE_FROM_DOR = "excludeFromDor";
     public static final String PN_MANDATORY = "mandatory";
     public static final String PN_HTML_ELEMENT_TYPE_V2 = "fd:htmlelementType";
+
+    public static final String PN_SUBMIT_ACTION_TYPE = "actionType";
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java
user: login: deepprakash345
body: Done
created_at: 2025-03-10T20:41:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -244,4 +245,13 @@ public static boolean isFragmentComponent(Resource resource) {
         return resource != null && resource.getValueMap().get(FormConstants.PROP_FRAGMENT_PATH, String.class) != null;
     }
 
+    public static boolean shouldIncludeSubmitProperties(SlingHttpServletRequest request) {
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/util/ComponentUtils.java
user: login: deepprakash345
body: added java doc
created_at: 2025-03-10T20:41:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -29,4 +29,6 @@ public static class Publish {}
      */
     public static class Author extends Publish {}
 
+    public static class Submission extends Publish {}
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/views/Views.java
user: login: deepprakash345
body: added java doc
created_at: 2025-03-10T20:41:53Z
author_association: CONTRIBUTOR
diff_hunk: @@ -82,6 +82,156 @@
         "visible" : false,
         "customProp": "customPropValue"
       }
+    },
+    "formcontainer-submissionView": {
path: bundles/af-core/src/test/resources/form/formcontainer/test-page-content.json
user: login: deepprakash345
body: Added exporters
created_at: 2025-03-10T20:42:15Z
author_association: CONTRIBUTOR
diff_hunk: @@ -277,9 +294,54 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = this.getSupportedSubmitActions();
+        String resourceType = resource.getValueMap().get("sling:resourceType", String.class);
+        supportedSubmitActions = Arrays.asList("spreadsheet");
+        if (supportedSubmitActions.contains(resource.getValueMap().get(ReservedProperties.PN_SUBMIT_ACTION_NAME))) {
+            if (resourceType != null && resourceType.contains("/franklin")) {
+                return "";
+            } else {
+                return "https://forms.adobe.com" + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" +
+                    ComponentUtils.getEncodedPath(resource.getPath() + ".model.json");
+            }
+        }
         return getContextPath() + ADOBE_GLOBAL_API_ROOT + FORMS_RUNTIME_API_GLOBAL_ROOT + "/submit/" + getId();
     }
 
+    private List<String> getSupportedSubmitActions() {
+        String supportedSubmitActionsUrl = "https://forms.adobe.com/adobe/forms/af/supportedSubmitActions";
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: moved
created_at: 2025-03-10T20:42:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -53,15 +53,15 @@
  */
 public class Utils {
 
-    public static InputStream getJson(Object model) {
+    public static InputStream getJson(Object model, Class<? extends Views.Publish> view) {
path: bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java
user: login: deepprakash345
body: had to override this method to send the submission view to test the exporter where json export needs to be done for Submission view
created_at: 2025-03-10T21:17:19Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,73 @@
+{
+    "id": "L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "fieldType": "form",
+    "lang": "en",
+    "title": "afv2",
+    "action": "https://forms.adobe.com/adobe/forms/af/submit/L2NvbnRlbnQvZm9ybXMvYWYvZGVtby9qY3I6Y29udGVudC9mb3JtY29udGFpbmVyLXN1Ym1pc3Npb25WaWV3Lm1vZGVsLmpzb24=",
+    "properties": {
+        "themeRef": "/libs/fd/af/themes/canvas",
+        "schemaType": "none",
+        "useExternalEmailTemplate": "true",
+        "fd:path": "/content/forms/af/demo/jcr:content/formcontainer-submissionView",
+        "fd:schemaType": "BASIC",
+        "fd:isHamburgerMenuEnabled": false,
+        "fd:roleAttribute": null,
+        "fd:formDataEnabled": false,
+        "fd:customFunctionsUrl": "/adobe/forms/af/customfunctions/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+        "fd:dataUrl": "/adobe/forms/af/data/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw=="
+    },
+    "events": {
+        "custom:setProperty": [
+            "$event.payload"
+        ]
+    },
+    ":itemsOrder": [
+        "textinput"
+    ],
+    "metadata": {
+        "grammar": "json-formula-1.0.0",
+        "version": "1.0.0"
+    },
+    "adaptiveform": "0.14.2",
+    "fd:submit": {
path: bundles/af-core/src/test/resources/form/formcontainer/exporter-submissionViewWithSubmissionAttribute.json
user: login: rismehta
body: fd:submit should be inside properties, it should not be at top level
created_at: 2025-03-11T04:16:29Z
author_association: COLLABORATOR
diff_hunk: @@ -142,4 +142,8 @@ private FormConstants() {
 
     /* The resource type for the pre-selected the linked panel */
     public final static String RT_FD_FORM_REVIEW_DATASOURCE_V1 = RT_FD_FORM_PREFIX + "review/v1/datasource";
+
+    public static final String X_ADOBE_FORM_DEFINITION = "x-adobe-form-definition";
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormConstants.java
user: login: rismehta
body: please add comments / java doc on why this constant is required.
created_at: 2025-03-11T04:17:15Z
author_association: COLLABORATOR
diff_hunk: @@ -142,4 +142,8 @@ private FormConstants() {
 
     /* The resource type for the pre-selected the linked panel */
     public final static String RT_FD_FORM_REVIEW_DATASOURCE_V1 = RT_FD_FORM_PREFIX + "review/v1/datasource";
+
+    public static final String X_ADOBE_FORM_DEFINITION = "x-adobe-form-definition";
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormConstants.java
user: login: deepprakash345
body: done
created_at: 2025-03-11T06:13:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,73 @@
+{
+    "id": "L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+    "fieldType": "form",
+    "lang": "en",
+    "title": "afv2",
+    "action": "https://forms.adobe.com/adobe/forms/af/submit/L2NvbnRlbnQvZm9ybXMvYWYvZGVtby9qY3I6Y29udGVudC9mb3JtY29udGFpbmVyLXN1Ym1pc3Npb25WaWV3Lm1vZGVsLmpzb24=",
+    "properties": {
+        "themeRef": "/libs/fd/af/themes/canvas",
+        "schemaType": "none",
+        "useExternalEmailTemplate": "true",
+        "fd:path": "/content/forms/af/demo/jcr:content/formcontainer-submissionView",
+        "fd:schemaType": "BASIC",
+        "fd:isHamburgerMenuEnabled": false,
+        "fd:roleAttribute": null,
+        "fd:formDataEnabled": false,
+        "fd:customFunctionsUrl": "/adobe/forms/af/customfunctions/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw==",
+        "fd:dataUrl": "/adobe/forms/af/data/L2NvbnRlbnQvZm9ybXMvYWYvZGVtbw=="
+    },
+    "events": {
+        "custom:setProperty": [
+            "$event.payload"
+        ]
+    },
+    ":itemsOrder": [
+        "textinput"
+    ],
+    "metadata": {
+        "grammar": "json-formula-1.0.0",
+        "version": "1.0.0"
+    },
+    "adaptiveform": "0.14.2",
+    "fd:submit": {
path: bundles/af-core/src/test/resources/form/formcontainer/exporter-submissionViewWithSubmissionAttribute.json
user: login: deepprakash345
body: made the change
created_at: 2025-03-11T06:14:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -277,6 +290,17 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = ComponentUtils.getSupportedSubmitActions(clientBuilderFactory);
+        String resourceType = resource.getValueMap().get("sling:resourceType", String.class);
+        supportedSubmitActions = Arrays.asList("spreadsheet");
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: This code is overwriting the network call, shouldn't it merge ?
created_at: 2025-03-11T07:13:16Z
author_association: COLLABORATOR
diff_hunk: @@ -277,6 +290,17 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = ComponentUtils.getSupportedSubmitActions(clientBuilderFactory);
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: Is it possible to defer the network call, this code would unnecessarily increase the error trace in log and skyline on-call would get triggered
created_at: 2025-03-11T07:13:48Z
author_association: COLLABORATOR
diff_hunk: @@ -277,6 +290,17 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = ComponentUtils.getSupportedSubmitActions(clientBuilderFactory);
+        String resourceType = resource.getValueMap().get("sling:resourceType", String.class);
+        supportedSubmitActions = Arrays.asList("spreadsheet");
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body:  this i will remove after testing and integrating with the submit service api. I have mentioned that url and this api can be changed during integration
created_at: 2025-03-11T10:09:32Z
author_association: CONTRIBUTOR
diff_hunk: @@ -277,6 +290,17 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = ComponentUtils.getSupportedSubmitActions(clientBuilderFactory);
+        String resourceType = resource.getValueMap().get("sling:resourceType", String.class);
+        supportedSubmitActions = Arrays.asList("spreadsheet");
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: Once its merged in FAR, you can't change it
created_at: 2025-03-11T11:17:24Z
author_association: COLLABORATOR
diff_hunk: @@ -277,6 +290,17 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = ComponentUtils.getSupportedSubmitActions(clientBuilderFactory);
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: rismehta
body: this will cause CSO today since every render on author would throw an error, fix this or log it as info
created_at: 2025-03-11T11:17:48Z
author_association: COLLABORATOR
diff_hunk: @@ -277,6 +290,17 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = ComponentUtils.getSupportedSubmitActions(clientBuilderFactory);
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: @rismehta 
, we can't defer the network call to submission service to fetch the supported submit actions.
This was as per our discussion and agreed upon design. In anycase , even if the api fails , we don't stop the execution or rendering at cc runtime.
This api is a basic fastly dictionary return which shouldn't fail until fastly itself is down.
cc:- @jalagari @vdua 
created_at: 2025-03-11T12:23:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -277,6 +290,17 @@ public String getRoleAttribute() {
 
     @Override
     public String getAction() {
+        List<String> supportedSubmitActions = ComponentUtils.getSupportedSubmitActions(clientBuilderFactory);
+        String resourceType = resource.getValueMap().get("sling:resourceType", String.class);
+        supportedSubmitActions = Arrays.asList("spreadsheet");
path: bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java
user: login: deepprakash345
body: Integrated with the live api and made the necessary changes in code and test mocks
created_at: 2025-03-11T12:23:46Z
author_association: CONTRIBUTOR

PR comments:
user: login: adobe-bot
created_at: 2025-03-05T10:07:29Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:07:29Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     93      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:07:40Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:09:02Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:32:00Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:34:34Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     87      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:34:34Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:34:47Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:52:20Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:52:21Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     93      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-05T10:52:31Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: codecov[bot]
created_at: 2025-03-05T10:55:47Z
body: ## [Codecov](https://app.codecov.io/gh/adobe/aem-core-forms-components/pull/1540?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe) Report
Attention: Patch coverage is `75.67568%` with `18 lines` in your changes missing coverage. Please review.
> Project coverage is 82.23%. Comparing base [(`66cc02f`)](https://app.codecov.io/gh/adobe/aem-core-forms-components/commit/66cc02f5b548272dd7400efcd177542024689f17?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe) to head [(`ee4ed68`)](https://app.codecov.io/gh/adobe/aem-core-forms-components/commit/ee4ed6865c87c754cdf985a08830542072d80772?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe).
> Report is 1 commits behind head on dev.

| [Files with missing lines](https://app.codecov.io/gh/adobe/aem-core-forms-components/pull/1540?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe) | Patch % | Lines |
|---|---|---|
| [.../cq/forms/core/components/util/ComponentUtils.java](https://app.codecov.io/gh/adobe/aem-core-forms-components/pull/1540?src=pr&el=tree&filepath=bundles%2Faf-core%2Fsrc%2Fmain%2Fjava%2Fcom%2Fadobe%2Fcq%2Fforms%2Fcore%2Fcomponents%2Futil%2FComponentUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe#diff-YnVuZGxlcy9hZi1jb3JlL3NyYy9tYWluL2phdmEvY29tL2Fkb2JlL2NxL2Zvcm1zL2NvcmUvY29tcG9uZW50cy91dGlsL0NvbXBvbmVudFV0aWxzLmphdmE=) | 71.05% | [5 Missing and 6 partials :warning: ](https://app.codecov.io/gh/adobe/aem-core-forms-components/pull/1540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe) |
| [...ponents/internal/form/FormStructureParserImpl.java](https://app.codecov.io/gh/adobe/aem-core-forms-components/pull/1540?src=pr&el=tree&filepath=bundles%2Faf-core%2Fsrc%2Fmain%2Fjava%2Fcom%2Fadobe%2Fcq%2Fforms%2Fcore%2Fcomponents%2Finternal%2Fform%2FFormStructureParserImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe#diff-YnVuZGxlcy9hZi1jb3JlL3NyYy9tYWluL2phdmEvY29tL2Fkb2JlL2NxL2Zvcm1zL2NvcmUvY29tcG9uZW50cy9pbnRlcm5hbC9mb3JtL0Zvcm1TdHJ1Y3R1cmVQYXJzZXJJbXBsLmphdmE=) | 25.00% | [4 Missing and 2 partials :warning: ](https://app.codecov.io/gh/adobe/aem-core-forms-components/pull/1540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe) |
| [...nts/internal/models/v2/form/FormContainerImpl.java](https://app.codecov.io/gh/adobe/aem-core-forms-components/pull/1540?src=pr&el=tree&filepath=bundles%2Faf-core%2Fsrc%2Fmain%2Fjava%2Fcom%2Fadobe%2Fcq%2Fforms%2Fcore%2Fcomponents%2Finternal%2Fmodels%2Fv2%2Fform%2FFormContainerImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe#diff-YnVuZGxlcy9hZi1jb3JlL3NyYy9tYWluL2phdmEvY29tL2Fkb2JlL2NxL2Zvcm1zL2NvcmUvY29tcG9uZW50cy9pbnRlcm5hbC9tb2RlbHMvdjIvZm9ybS9Gb3JtQ29udGFpbmVySW1wbC5qYXZh) | 96.42% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/adobe/aem-core-forms-components/pull/1540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe) |

<details><summary>Additional details and impacted files</summary>


```diff
@@             Coverage Diff              @@
##                dev    #1540      +/-   ##
============================================
- Coverage     82.43%   82.23%   -0.21%     
- Complexity      974      994      +20     
============================================
  Files           107      107              
  Lines          2511     2584      +73     
  Branches        347      367      +20     
============================================
+ Hits           2070     2125      +55     
- Misses          262      271       +9     
- Partials        179      188       +9     
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/adobe/aem-core-forms-components/pull/1540?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adobe).

<details><summary>🚀 New features to boost your workflow: </summary>

- ❄ [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- 📦 [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: deepprakash345
created_at: 2025-03-06T04:26:02Z
body: > There has been a parallel discussion of jncluding the submit props in the properties API. @vaibhav2601 has been working in the same. It should be thought through if we want to have them as form definition or form properties. Btw whats the runtime use for it.. is it documented anywhere? If there's a valid use case then both of the formats should be consistent.

Hi @nit23uec ,
We need the submit details in the form definition to process submissions from submission service for UE/CC authored forms.
I did have a discussion with @vdua , @rismehta and agreed to implement it in the form model.
author_association: CONTRIBUTOR
user: login: rismehta
created_at: 2025-03-06T04:31:01Z
body: > There has been a parallel discussion of jncluding the submit props in the properties API. @vaibhav2601 has been working in the same. It should be thought through if we want to have them as form definition or form properties. Btw whats the runtime use for it.. is it documented anywhere?
If there's a valid use case then both of the formats should be consistent.

@nit23uec @deepprakash345 The JSON is not required at runtime for rendering the form on the client side. That’s why it is exposed as a separate JsonView, rather than being part of the form model JSON (i.e., publish view).

Currently, Form Properties are only used in the author tier, but it would be beneficial to reuse the same in the publish tier for this use case. Similarly, DOR properties, which are required for Delrina, should also follow the same approach.

Since Form Properties may take time to be fully implemented, we should proceed with these changes now, as they are blocking the UE submission use case (for this release - core components is about to be part of FAR now)

@deepprakash345 – I assume the MT submit service has information about the bucket, allowing it to call the Form Properties API in the future. If that’s the case, let’s ensure the Properties API is designed to accommodate this use case as well.

Currently, the code is not in good shape and appears cluttered. We should introduce these changes in a minimal and structured way, ensuring they can be easily removed later if needed.
author_association: COLLABORATOR
user: login: rismehta
created_at: 2025-03-06T04:35:45Z
body: > > There has been a parallel discussion of jncluding the submit props in the properties API. @vaibhav2601 has been working in the same. It should be thought through if we want to have them as form definition or form properties. Btw whats the runtime use for it.. is it documented anywhere? If there's a valid use case then both of the formats should be consistent.
> 
> Hi @nit23uec , We need the submit details in the form definition to process submissions from submission service for UE/CC authored forms. I did have a discussion with @vdua , @rismehta and agreed to implement it in the form model.

@deepprakash345 Please check my last comment, we should re-use the form properties API. Submission/DOR metadata should not be part of form definition
author_association: COLLABORATOR
user: login: adobe-bot
created_at: 2025-03-08T08:58:05Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     93      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-08T08:58:05Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-08T08:58:15Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-08T08:59:33Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-08T08:59:44Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T09:06:50Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     92      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T09:06:50Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T09:07:00Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T09:07:01Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T09:07:09Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: deepprakash345
created_at: 2025-03-10T20:51:04Z
body: @rismehta , @vdua 
I have made the suggested changes from the review and resolved the comments. Kindly check .
author_association: CONTRIBUTOR
user: login: adobe-bot
created_at: 2025-03-10T21:13:44Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T21:13:44Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     92      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T21:13:55Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T21:15:07Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T21:15:42Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T21:39:11Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     92      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T21:39:11Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T21:39:22Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T21:40:07Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-10T21:41:17Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T06:34:29Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     91      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T06:34:29Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T06:34:39Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T06:34:42Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T06:35:09Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T06:58:21Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: deepprakash345
created_at: 2025-03-11T07:12:55Z
body: @rismehta , made the suggested changes
author_association: CONTRIBUTOR
user: login: adobe-bot
created_at: 2025-03-11T12:45:02Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T12:45:02Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     92      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T12:45:13Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T12:47:28Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T12:48:38Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T12:49:49Z
body: ### Lighthouse scores (mobile)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     92      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T12:49:49Z
body: ### Lighthouse scores (desktop)

|        | Performance | Accessibility | Best-Practices | SEO |
| ------ | ----------- | ------------- | -------------- | --- |
| Scores |     100      |       96       |       96       |  75 |
author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T12:50:00Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T12:51:43Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE
user: login: adobe-bot
created_at: 2025-03-11T12:56:22Z
body: 

### Accessibility Violations Found
| Id                             | Impact                    |
| ------------------------------ | ------------------------- |
| label-title-only               | serious                   |
| target-size                    | serious                   |

author_association: NONE