I am having trouble getting the rule to work to have my "submit" only function after an attachment is added.

(NOTE - I have a form with several optional sections that make using validation not an option). Thus far I have;

  1. added the Attachment filed as here but with the format rule (instead of validation) to show the message "Form cannot be submitted without attachment" when "count(../my:Attachments/attachmentURL) = 0". So when a user enters the page it defaults to this message. When they add an attachment the message disappears.

  2. I have added the submit button to this section and am trying to get the rule to work such that until an attachment is added, the format rule will disable the control (submit button).

I have tried every possible condition but can't get it to work. Any ideas would be appreciated. (I am working under the premise if I can hide the message I should be able to activate / deactivate the button as well)

1 Answer 1


I have looked into this as well some time ago and came across a workaround, I believe suggested by Laura Rogers on her Powerhour (some years ago).

Suggestion: Instead of disabling the button, hide the button until the attachment is attached.

So, put the submit button inside a separate section, and as long as "count(../my:Attachments/attachmentURL) = 0" hide the section. Then when an attachment is added the button appears.

You could interchange the button with the message ""Form cannot be submitted without attachment" so it is a little more visually pleasing. (or maybe a picture of a grayed out button).

Hope this helps,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.