Date Value was not showing in the SharePoint list - date

I created a column called date in SharePoint and using created method using REST API while debugging code. I am getting the value against the my column in developer tool but same was not showing the SharePoint list.
HTML code:
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 form-group">
<label class="col-lg-4 col-md-4 col-sm-4 col-xs-4 cls-thought">Date<span class="red">*</span></label><div class="col-lg-8 col-md-8 col-sm-8 col-xs-8"> <input class="form-control" type="date" id="bdinput"/>
</div>
</div>
Date:var date = $('#bdinput').val()

Related

How to pass a date from a static site form to a Google Form?

I have a simple form on an HTML site. The form is integrated with Google Form and then on with Google Sheets. To give you more details: when a user submits a form on my website the data is passed to fill the Google Form and then are saved in the Google Spreadsheet.
The problem I have is passing a date field. How should I pass a date field to a Google Form?
With a text field there is no problem as I match them by using for example name="entry.77808571"
BUT,
for a date Google Form has three entries, e.g.:
name="entry.1307321649_year" name="entry.1307321649_month" name="entry.1307321649_day"
So 3 "name" properties for one input field.
I provide my code for the form, so hopefully you can see what I mean above:
<form action="https://docs.google.com/forms/u/0/d/e/1FAIpQLSfglf8uoaPBwXQNZb44C3qyDfxV7mv4wIlSTamUfHwolsJ0Lg/formResponse">
<div class="control-group">
<div class="form-group floating-label-form-group controls">
<label class="control-label" for="date">Date</label>
<input type="text" class="form-control datepicker" name="entry.1307321649" placeholder="Zameldowanie" id="date" required data-validation-required-message="Please enter dates." autocomplete="off">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="control-group">
<div class="form-group floating-label-form-group controls">
<label class="control-label" for="date">Date</label>
<input type="text" class="form-control datepicker" name="entry.77808571" placeholder="Wymeldowanie" id="date" required data-validation-required-message="Please enter dates." autocomplete="off">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="control-group">
<div class="form-group floating-label-form-group controls">
<label>Name</label>
<input type="text" class="form-control" placeholder="Imię i Nazwisko" id="name" name="entry.191476008" required data-validation-required-message="Please enter your name.">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="control-group">
<div class="form-group floating-label-form-group controls">
<label>Email Address</label>
<input type="email" class="form-control" placeholder="Adres Email" id="email" name="entry.1612291661" required data-validation-required-message="Please enter your email address.">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="control-group">
<div class="form-group col-xs-12 floating-label-form-group controls">
<label>Phone Number</label>
<input type="number" class="form-control" placeholder="Numer Telefonu" id="phone" name="entry.199915649" required data-validation-required-message="Please enter your phone number.">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="control-group">
<div class="form-group floating-label-form-group controls">
<label>Message</label>
<textarea rows="5" class="form-control" placeholder="Wiadomość" id="message" name="entry.948216718" data-validation-required-message="Please enter a message."></textarea>
<p class="help-block text-danger"></p>
</div>
</div>
<br>
<div id="success"></div>
<button type="submit" class="btn btn-primary" id="sendMessage">Rezerwuj</button>
</form>
So far I used a workaround and passed the date as a text. But then I'm having a problem with integrating it with Google Calendar (the data goes from Google Sheets to Calendar), as I need to have a date not text to do so.
Please shout if you have any questions and counting for your help.
Many thanks!
Justyna
You can pass a date that will be reconized as such correctly as following:
Just pass the full netry for the date, without separating into year, month and day - just as you are doing now. So:
<div class="form-group floating-label-form-group controls">
<label class="control-label" for="date">Date</label>
<input type="text" class="form-control datepicker" name="entry.1307321649" placeholder="Zameldowanie" id="date" required data-validation-required-message="Please enter dates." autocomplete="off">
</div>
When filling out your custom HTML form, paste the full date into the corresponding input field in the format 2020-10-15.
In this format your date will be recognized in the destination spreadsheet correctly as a date object.
Btw, if you create a Prefill URL for your Google form, it will look e.g. like following:
https://docs.google.com/forms/d/e/XXX/viewform?entry.1141768477=Option+1&entry.1199891753=mail#mail.com&entry.1037962790=2020-10-20&entry.2138552921=Option+1
This allows you to see the correct formatting for dates, multiple-choice options etc.

Update bootstrap form from a mongodb query

I would like to populate a bootstrap form with results from a mongo query using handlebars but am not sure where to put the relevant expressions.
For example, if the code is:
<form method="post" action="/students" enctype="multipart/form-data">
<div class="form-group col-md-12">
<label class="col-md-2 control-label" for="title">STUDENT</label>
</div>
<div class="form-group col-md-12">
<label class="col-md-2 control-label" for="title">Surname</label>
<div class="col-md-2">
<input class="form-control" type="text" name="surname">
</div>
<label class="col-md-2 control-label" for="title">First Name</label>
<div class="col-md-2">
<input class="form-control" type="text" name="firstname">
</div>
</div>
</form>
and, say I have the following {{surname}} and {{firstname}} expressions, is there a place in the code I can put them to ensure that when the page renders the forms contain the surname and firstname objects already? Is this even possible?
Any help is much appreciated
If I understand you right you want the inputs value to be filled. You can set the inputs value like this
<input class="form-control" type="text" name="surname" value="{{$surname}}">

Bootstrap .form-inline but keep label above fields

<div class="form-inline">
<div class="form-group has-feedback">
<label for="id_first_name">First Name</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input class="form-control" id="id_first_name" name="first_name" type="text" />
</div>
</div>
<div class="form-group has-feedback">
<label for="id_last_name">Last Name</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input class="form-control" id="id_last_name" name="last_name" type="text" />
</div>
</div>
</div>
I get a output similar to this: http://i.stack.imgur.com/YKvOY.png
But I want the labels above the fields.
I googled and I see a lot of people have the same problem but exactly the opposite. They have the labels above the fields and want them in the same line. However I tried their code, still not working.
I've created this fiddle demonstrating this using what you provided. form-group should do the trick.

Form submit from Bootstrap 3 and JSP get parameter

I'm new to Bootstrap. But I'm pretty familiar with HTML. The thing is I cannot get parameter values from JSP. The parameters are from HTML page with Bootstrap 3. Here're the code. I don't understand. If I make simple html only page, then I could get the parameters.
<form class="form-horizontal" method="POST" action="makeResv.jsp">
<div class="container">
<div class="row">
<div class="control-group col-md-5">
<label for="checkIn">date1</label>
<div id="date-container">
<div class="input-group date">
<input type="text" id="checkIn" class="form-control"><span
class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
</div>
</div>
</div>
<div class="control-group col-md-5">
<label for="checkOut">date2</label>
<div id="date-container">
<div class="input-group date">
<input type="text" id="checkOut" class="form-control"><span
class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
</div>
</div>
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-success">search</button>
</div>
</div>
</div>
</form>
In a JSP page, I'm just doing the following.
String checkIn = request.getParameter("checkIn");
String checkOut = request.getParameter("checkOut");
out.println(checkIn + " " + checkOut);
What's wrong with the above HTML code with Bootstrap?? Please give me some advise. Thanks!!
BTW, I'm using datepicker JavaScript library, but I don't think that affect the results. I cannot add the library code here but it works great anyway.
https://github.com/eternicode/bootstrap-datepicker
Bootstrap is same as HTML. The problem you are having is because you do not have any name attribute defined in your input element. You define id but to access submited variables via POST (request.getParameter() function) you need to have name attribute defined:
Replace <input> lines like this:
<input type="text" name="checkIn" id="checkIn" class="form-control">
And
<input type="text" name="checkOut" id="checkOut" class="form-control"><

Bootstrap Forms > Input field grid issue > only works when appended

Noticed something strange on my Bootstrap forms today (v303).
I set my labels to use 3 columns and the input field to use 9 columns, and normally I'd expect this to extend full width of the available space.
But the fields seem to have a mind of their own and are adjusting to their own widths... I can't seem to get them to extend.. even if I add more columns.
What's strange is that, for my fields w/ Bootstrap PREPEND character, it goes full width as expected.
screenshot:
code:
<div class="form-group">
<label class="col-sm-3 control-label">A</label>
<div class="col-sm-9">
<div class="input-group">
**<span class="input-group-addon">#</span>**
<input type="text" class="form-control" placeholder="Username">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">B</label>
<div class="col-sm-9">
<div class="input-group">
<input type="text" class="form-control" placeholder="Username">
</div>
</div>
</div>
You are using the input-group class incorrectly.
Extend form controls by adding text or buttons before, after, or on both sides of any text-based input. Use .input-group with an .input-group-addon to prepend or append elements to a single .form-control.
http://getbootstrap.com/components/#input-groups
input-group will only work well when textbox has other elements before and/or after. As such, from your second input either remove the enclosing input-group div or add some surrounding content within the tag.
<div class="form-group">
<label class="col-sm-3 control-label">A</label>
<div class="col-sm-9">
<div class="input-group">
<span class="input-group-addon">#</span>
<input type="text" class="form-control" placeholder="Username">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">B</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="Username">
</div>
</div>