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 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!
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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,675)