Project Authorization Form


i don’t understand step 7, it says:
"On lines 14 through 21, you can see a method named .authorize().

This method will check whether a submitted password is equal to ‘swordfish’. If it is, then this.state.authorized will become true.

You need authorize to get called whenever a user hits “Submit!”

Give the <form></form> an onSubmit attribute. Set the attribute’s value equal to the authorize function."

It gives me this code (

 <form action="#" onSubmit={this.authorize}>

) as a hint but I don’t know where to put it.

Can anyone help?

The FORM element is in the login JSX object.

    const login = (
      <form action="#" onSubmit={this.authorize}>
        <input type="password" placeholder="Password" />
        <input type="submit" />

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.