Jump to content

HTML FORM


Ilounah
 Share

Recommended Posts

Hello :) Good Day Guys, I don't know how to make it work can you please share some tips or path me on the right way.

I'm Planning to create a form in html with a condition, if Hongkong, Shanghai and Empress textbox  value is empty then put Noodles textbox value to 0, else 1.

Form.png

Link to comment
Share on other sites

@Daniza You would have to use some JavaScript to make that happen, you can try reading these helpful resources and figure it out yourself:

https://developer.mozilla.org/en-US/docs/Web/Events

https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms

You can also show your HTML code so that maybe I can write a little example JavaScript for you :)

P.S What do noodles have to do with Hong Kong or Shanghai? :lol:

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Thank's @TheDcoder ^_^ (Link Bookmark)

P.S What do noodles have to do with Hong Kong or Shanghai? :lol:

- Noodles is a Item Category, I have a Stock Request Form that I made in Excel vba and I wan't  to level it up using Database so I can easily do CRUD ( create, request, update and delete) on my forms, anyway flows goes like this see attach file (Default.png) if Siopao Category has no request items before I sent it to the Database, form will sort and remove all no request item (see attach Remove.png). and I don't have any idea how to make Item Category remove or remain if items has a value or not.

Sorry for my Bad English :P

Default.png

Remove.png

Edited by Daniza
Link to comment
Share on other sites

So the noodles are a category and the Shangai, Hong Kong, Empress noodles are the actual items?

If that is the case then I think you can skip the input for noodles, just make it a container and put the noodles items in it. You can handle the value of noodles during updating the database (0 if no noodles have been request, else 1 according to your logic).

JavaScript is pretty easy to bypass so you should always validate the input on the server side so that noodles doesn't have 1 with all the other noodles with value 0

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...