Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Form submitted successfully despite required fields being blank

(0) ShareShare
ReportReport
Posted on by 39
Good afternoon all
 
I hope you are well
 
I am having an issue with a form I have created on Power Apps.
 
I noticed after some tests that after I leave required field specifically to see if I will be alerted, and then submit the form, the form submits successfully and a "default" value is used as input in the SP. I noticed it automatically inputs the first value of the choice column actually.
 
As an example, detail of a specific field:
Reporting mechanism_DataCard1 :
- Required propert set to true
DataCardValue16 :
- Required property : N/A
- Items property : Choices([@'Main Table'].'Reporting mechanism')     -    This is a choice column in my SP and in the Default value property of that column there is no default value 
 
 
Submit button properties
- OnSelect : SubmitForm(Form); 
 
 
So ideally it should not input anything in the SP if the field is not completed (if a selection is not made). The required property is set to required already so I wonder why I am able to submit the form successfully.
 
Let me know if you need more details
 
Thank you
 
Vince
  • VA-31070842-0 Profile Picture
    39 on at
    Form submitted successfully despite required fields being blank
    Hello PowerWizard,

    Thanks for the help
     
    I seem to not have any problem now. I have so many fields it's hard to tell if I managed to cover them all but it did work spontaneously on the first one as said before. And I did a few tests which are successful (or not in the sense that i could not submit with an empty field).

    Thanks for the assist
     
    Vince
  • VA-31070842-0 Profile Picture
    39 on at
    Form submitted successfully despite required fields being blank
    Hello PowerWizard,
     
    Thanks a lot for your help
     
    Step 1 all was good
    I have done step 2 (default property) and it worked on one of the fields I had issues with.

    So I will go through all of them, do some tests and invididually leave them blank one after the other to see how it goes.
     
    I will keep you posted
     
    Thanks
     
    Vince
  • PowerWizard Profile Picture
    8 on at
    Form submitted successfully despite required fields being blank
    It looks like the issue you're facing is related to how Power Apps handles required fields and default values in choice columns. When you submit the form, Power Apps might be defaulting to the first value in the choice column because it treats the field as if it has been filled, even though it hasn’t.
    Here are a few things you can check and try:
     
    1.Check the Required Property in the Field’s DataCard:
       - Make sure the `Required` property is set correctly in the `DataCard` (e.g., `DataCard1.Required = true`). Sometimes the required property is only set at the data source level, but not enforced at the form level.
     
    2. Set the Default Value to Blank:
       - In the `DataCardValue16` (the choice column control), set the `Default` property explicitly to `Blank()`:
        
         If(IsBlank(Parent.Default), Blank(), Parent.Default)
     
         This ensures that no value is selected until the user makes a choice.
     
    3. Validation Logic:
       - Add a validation check before submitting the form. For example, modify the `OnSelect` property of the submit button:
        
         If(
           IsBlank(DataCardValue16.Selected),
           Notify("Please select a value for Reporting Mechanism", NotificationType.Error),
           SubmitForm(Form)
         )

       
    4. Field Updates:
       - Sometimes Power Apps might not recognize that the field was required because of how the data is being bound. Ensure that the field is properly connected to the SharePoint list column and that there are no extra bindings.
     
    After testing these, let me know if the issue persists, and we can look deeper!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,537 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,908 Most Valuable Professional

Leaderboard