Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Oct 2019
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to create a form in html

    Dear All

    Am trying to create a form in web base for my company. It works like a notice board for user to input any information in a form and allow to send email out too if they want.

    In the form, I hope to create a field whereby can allow user to key in not only text but also change font.. colour.. copy and paste a graphic into it etc.. just like a mini word sw for user to key in anything.. any idea how can I do it using html? Also how to click submit and an email is create for user to send the email with the link of the form to anyone they want?

    Thot this should be simple but not sure where to find the coding.. anyone can advise where can I learn this or how to do this? I can create the php database for the form info to input into it but not sure how to create the form using html only..

    Any advise will be appreciated.. thank you so much. Attach is a form see from a phone so is quite small but can see we can do various alignment ..font change etc on it.

    Sent from my SM-N950F using Tapatalk

  2. #2
    New to the CF scene
    Join Date
    Oct 2019
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you can use this code for form:
    Code:
    <html>
    <body>
    
    <h2>HTML Forms</h2>
    
    <form action="/action_page.php">
      First name:<br>
      <input type="text" name="firstname" value="Mickey">
      <br>
      Last name:<br>
      <input type="text" name="lastname" value="Mouse">
      <br><br>
      <input type="submit" value="Submit">
    </form>
    
    <p>If you click the "Submit" button, the form-data will be sent to a page called "/action_page.php".</p>
    
    </body>
    </html>
    for text editor you must use php or other backend programming language.
    Last edited by vinyl-junkie; Oct 13th, 2019 at 02:46 PM. Reason: self-promotional link removed; added code BB tags

  3. #3
    New Coder
    Join Date
    Mar 2018
    Posts
    25
    Thanks
    0
    Thanked 1 Time in 1 Post
    https://www.tiny.cloud/

    Check this page if you want to install it.

  4. #4
    New to the CF scene
    Join Date
    Oct 2019
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by minubii View Post
    you can use this code for form:
    Code:
    <html>
    <body>
    
    <h2>HTML Forms</h2>
    
    <form action="/action_page.php">
      First name:<br>
      <input type="text" name="firstname" value="Mickey">
      <br>
      Last name:<br>
      <input type="text" name="lastname" value="Mouse">
      <br><br>
      <input type="submit" value="Submit">
    </form>
    
    <p>If you click the "Submit" button, the form-data will be sent to a page called "/action_page.php".</p>
    
    </body>
    </html>
    for text editor you must use php or other backend programming language.
    Hi

    Thank you. I have no problem create above form but any good example on how to create the text editor type of form even if have to use php?
    Thank you.

    Sent from my SM-N950F using Tapatalk

  5. #5
    New to the CF scene
    Join Date
    Oct 2019
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jacxx View Post
    https://www.tiny.cloud/

    Check this page if you want to install it.
    Sorry.. my company don't allow install any stuff fr web.. any good page got teach how to create text editor form? Thank you.

    Sent from my SM-N950F using Tapatalk

  6. #6
    Regular Coder
    Join Date
    Sep 2014
    Posts
    315
    Thanks
    1
    Thanked 55 Times in 53 Posts
    Quote Originally Posted by Joanneloh View Post
    Sorry.. my company don't allow install any stuff fr web.. any good page got teach how to create text editor form? Thank you.

    Sent from my SM-N950F using Tapatalk
    What you are want to do is not trivial. It took me at least 6 months to create a generalized wysiwyg.

    1) Create a div with contenteditable property. https://developer.mozilla.org/en-US/...ontenteditable
    2) depending on the browser, you have to know how selection works.
    https://developer.mozilla.org/en-US/.../API/Selection or
    or https://developer.mozilla.org/en-US/...w/getSelection

    3) know dom manipulation (as in, createTextNode or createNode, appendChild, .. etc).

    Last edited by josephm; Oct 14th, 2019 at 02:46 AM.

  7. #7
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    11,405
    Thanks
    7
    Thanked 1,375 Times in 1,344 Posts
    Quote Originally Posted by Joanneloh View Post
    Sorry.. my company don't allow install any stuff fr web.. any good page got teach how to create text editor form? Thank you.
    Yeah, as josephm said, this isn’t trivial, and also, why reinvent the wheel when there are ready-made scripts/libraries for that? If TinyMCE, as jacxx suggested, isn’t an option then there are alternatives like CKEditor, OpenWISYWIG or Froala Editor.

    And it’s not like you would “install it from the web”; you download the source code and add it to your HTML document as if you had written it yourself. You’re even able to modify the JS files yourself (although whether this is allowed depends on the license), so I don’t see any reason why not to use these.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •