Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9172533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:22:11+00:00 2026-06-17T16:22:11+00:00

I currently have a form that would ask a user specifically the working hours

  • 0

I currently have a form that would ask a user specifically the working hours of businesses
below is what I’m using.

<tr>
        <td colspan="2"><input type="radio" name="mon" value="1"> Monday with No Lunch Break</td>
        <td colspan="4"><input type="radio" name="mon" value="2"> Monday with  Lunch Break</td>
    </tr>
    <tr>
        <td>Start time :AM<input type="time"  name="mon_strt_1" class="hour_field"></td>
        <td>End time :PM<input type="time" name="mon_end_1" class="hour_field"></td>
        <td>Start time :AM<input type="time"  name="mon_strt_2a" class="hour_field"></td>
        <td>End time :AM<input type="time" name="mon_end_2a" class="hour_field"></td>
        <td>Start time :PM<input type="time" name="mon_strt_2b" class="hour_field"></td>
        <td>End time :PM<input type="time"  name="mon_end_2b" class="hour_field"></td>
    </tr>

As you see I asked the user if on Monday the business would have a lunch break if so he would fill out the proper field and also clicking on the radio button. I would like to ask any help on how to make things easier for the user. That once he entered a time frame Like 8:00am to 6:00pm then would enter the lunch break 12:00nn to 1:00pm upon submission would return WORKING HRS: 8:00am to 12:00nn , 2:00pm to 6:00pm, Here’s a link for a plugin that I used but i can’t manage to use it in multiple forms. Note that i would also set the time from tuesday to friday. then sat to sun.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:22:13+00:00Added an answer on June 17, 2026 at 4:22 pm

    very simple. html and javascript:

    <script>
    function disablebreaks(disable){
        document.getElementsByName('break_strt')[0].disabled=disable;
        document.getElementsByName('break_end')[0].disabled=disable;
    }
    </script>
    <form action="action.php" method="post">
    <input type="radio" name="mon_break" value="false" onchange="disablebreaks(true)" />No break
    <input type="radio" name="mon_break" value="true" onchange="disablebreaks(false)" />break
    <input type="time" name="mon_strt" />
    <input type="time" name="mon_end" />
    <input type="time" name="break_strt" />
    <input type="time" name="break_end" />
    </form>
    

    php in action.php:

    <?php
    echo $_POST['mon_break']?"working hrs: {$_POST['mon_strt']} to {$_POST['break_strt']}, {$_POST['break_end']} to {$_POST['mon_end']}":"working hrs: {$_POST['mon_strt']} to {$_POST['mon_end']}";
    ?>
    

    This is untested, tell me if errors occur.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have form that checks if a user has unsubmitted changes when they
I have a form that a user would fill out while creating a ticket
I have an Ajax form that sends input data to a controller. I currently
I currently have a simple form that when you click the save button will
I currently have a PHP form that uses AJAX to connect to MySQL and
I currently have a web form aspx page that calls RegisterClientScriptBlock. This sends down
I currently have this useful code that I found elsewhere on StackOverflow: form.DrawToBitmap(bmp, new
I currently have a form that I am trying to perform a post on
I have an existing form that I would like to add email functionality to.
Currently I have a form that makes use of fields and check boxes. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.