<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>a!buttonWidget and Confirmation Message</title><link>https://community.appian.com/discussions/f/user-interface/37631/a-buttonwidget-and-confirmation-message</link><description>Hi All, 
 I have a form for the user to add some required/ optional fields, right now my confirmation message in the submit button shows before it validates the required fields. So it shows confirmation message, and then shows the red field validations</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: a!buttonWidget and Confirmation Message</title><link>https://community.appian.com/thread/141276?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2024 13:40:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:df09f1c9-508f-4545-ade7-7c86534e7a7e</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Whipped up a simple example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!text1,
  local!text2,
  
  local!allRequiredFieldsFilled: and(
    a!isNotNullOrEmpty(local!text1),
    a!isNotNullOrEmpty(local!text2)
  ),
  
  a!formLayout(
    label: &amp;quot;My Form&amp;quot;,
    contents: {
      a!textField(
        label: &amp;quot;text 1&amp;quot;,
        value: local!text1,
        saveInto: local!text1,
        required: true()
      ),
      a!textField(
        label: &amp;quot;text 2&amp;quot;,
        value: local!text2,
        saveInto: local!text2,
        required: true()
      )
    },
    buttons: a!buttonLayout(
      primaryButtons: {
        a!buttonWidget(
          label: &amp;quot;Submit&amp;quot;,
          validate: true(),
          confirmMessage: if(local!allRequiredFieldsFilled, &amp;quot;Ready to Finish?&amp;quot;, &amp;quot;&amp;quot;)
        )
      }
    )
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If any required field is un-filled, there&amp;#39;s no confirmation message, otherwise it displays as normal.&amp;nbsp; (Note, the same conditional logic would also need to wrap the &amp;quot;confirm header&amp;quot; if that is used too - there&amp;#39;s no way to simply turn the message on/off without just running the same logic on both of those parameters).&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/pastedimage1727790074822v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: a!buttonWidget and Confirmation Message</title><link>https://community.appian.com/thread/141253?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2024 03:45:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1febc5bc-9f54-4a88-8d86-5a640a2dcf41</guid><dc:creator>Soma</dc:creator><description>&lt;p&gt;The other approach could be, to disable the buttons until all the requiired fields are filled and then enable to use the confirmation message&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: a!buttonWidget and Confirmation Message</title><link>https://community.appian.com/thread/141238?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2024 18:48:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4a6b7d5f-750f-4f6c-9a05-3e525bdfaf1b</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;This would require either a behavioral change to be introduced to the component itself (which i&amp;#39;m not altogether opposed to), or perhaps better, an optional parameter to shift the order of evaluation between the two things.&amp;nbsp; Any of these would require a Support Case with Appian, then a (lengthy, and probably longer-than-you-want-to-wait) waiting period for it to be introduced to the base product.&lt;/p&gt;
&lt;p&gt;Such a thing is *plausibly* possible via HIGHLY-MANUAL workarounds - since you can determine the very presence of the confirmation messages for a button click via expressionable logic, you could plausibly run your own &amp;quot;all required fields filled&amp;quot; check, in the background, and only have the confirmation parameters pass anything when you detect that requirements have been satisfied.&amp;nbsp; For one or two required fields this is pretty simple, but for a long form and any additional level of complexity, it&amp;#39;s obviously quite a lift and in many cases barely feasible (if at all).&amp;nbsp; But just suggesting it for completeness and in case you have a critical and/or simpler case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: a!buttonWidget and Confirmation Message</title><link>https://community.appian.com/thread/141236?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2024 17:46:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9fd89b6f-785e-4d98-ba91-f4789d484fa7</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;No. I agree that this does not make a lot of sense, but we cannot configure this behaviour.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>