cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kam1
Helper I
Helper I

Can you make a text input field required without using a datacard?

Hi Everyone,

 

I am currently creating an App without a form (so no DataCards) and I require 3 of my Text input fields to be required fields.

Is there anyway of doing this without datacards?

would appreciate any help on this

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@Kam1 
You can disable your Submit button until all 3 fields are filled by placing this code in the DisplayMode property

 

If(
    !IsBlank(TextInput1.Text) 
    And !IsBlank(TextInput2.Text)
    And !IsBlank(TextInput3.Text),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

Add an IF() to the DisplayMode of the button you are using to submit the data.  If the textfield is empty then set display mode of the button to disabled and if its not set it to Edit.  Until the user fills in the text field they won't be able to submit, so it will be required.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

mdevaney
Super User
Super User

@Kam1 
You can disable your Submit button until all 3 fields are filled by placing this code in the DisplayMode property

 

If(
    !IsBlank(TextInput1.Text) 
    And !IsBlank(TextInput2.Text)
    And !IsBlank(TextInput3.Text),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thanks guys.

Worked a treat!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,203)