DHTMLX SCHEDULER - scheduler

[enter image description here][1] I want to add Time period section to fully custom light box.
[<form id='form1'>
<span class="label">Text</span><input id="Text1" name="text" type="text"/><br />
<span class="label">From</span><input id="start_date" name="start_date" type="text"/>
<span class="label">to</span><input id="end_date" name="end_date" type="text"/><br />
<span class="label">Room_id</span><input id="Text4" name="room_id" type="text"/>
<span class="label">User Id</span><input id="Text5" name="user_id" type="text"/>
<input type="text" id="patient_name" name="patient_name"/>
<input type="text" id="patient_dob" name="patient_dob"/>
<input id="Hidden1" name="id" type="hidden"/>
</form>][1]
[1]: SEE this Image https://i.stack.imgur.com/A3spf.png

It shouldn't be very difficult
you need to find a date-time picker component that works for you
(datepicker embedded into dhtmlxScheduler lacks time-picker
functionality)
when user opens lightbox - you initialize datepickers in form inputs and assign event.start_date/end_date into them
when user saves lightbox - you get values from datepickers and update event.start_date/end_date with those values.
Here is a demo - http://docs.dhtmlx.com/scheduler/snippet/5e45f342
I used this example https://docs.dhtmlx.com/scheduler/samples/02_customization/16_custom_form.html and flatpickr datepicker https://chmln.github.io/flatpickr/ for it.

Related

Autocomplete credit card expiry cc-exp not filling in the desired format

I've recently discovered that my credit card expiry date is not being populated by the browser autocomplete even though Name and Card number populate fine. The field does highlight as if it wants fill, it just doesn't get a value.
I have looked at other sites with working forms for differences and found that changing the expiry date to type="tel" allows it to be filled, but the format is MM/YYYY. I can add maxlength="5" to change the format to MM/YY but I want the format to be MMYY without the slash. A maxlength="4" fails to fill.
Here's my code without any of the noted workarounds. I don't feel that tel is the appropriate input type but it's good to give a numerical keyboard on mobile devices when the input is only numbers.
Please can you share your wisdom on ways to autofill the credit card expiry date in a MMYY format without a slash separator?
.standardControl {
margin-bottom: 10px;
}
.standardControl label {
display: block;
}
<form action="" method="post">
<div class="standardControl">
<label for="Name">Name on card</label>
<input type="text" class="text" id="Name" name="Name" value="">
</div>
<div class="standardControl">
<label for="CardNumber">Card number</label>
<input type="number" class="number" id="CardNumber" name="CardNumber"
autocomplete="cc-number">
</div>
<div class="standardControl">
<label for="ExpiryDate">Expiry date
<span class="additionLabel">(MMYY)</span></label>
<input type="number" class="number" id="ExpiryDate" name="ExpiryDate"
autocomplete="cc-exp" placeholder="MMYY" value="">
</div>
<div class="standardControl">
<label for="securityCode">Security code</label>
<input type="number" class="number" id="securityCode" name="securityCode">
</div>
</form>

Modifying TYPO3 form.checkbox hiddenfield

When the following code is added to a partial HTML class in TYPO3.
<f:form.checkbox id="myCheckBox" property="myCheckBox" value="Y" multiple="no" />
When the form is loaded within a TYPO3 extension the following code is generated for the checkbox
<input type="hidden" name="form[newForm][myCheckBox]" value="" />
<input id="myCheckBox" type="checkbox" name="form[newForm][myCheckBox]" value="Yes" />
Is there a way of adding the parameter ID to the auto generated hidden field so we have:
<input type="hidden" id="myCheckBoxHidden" name="form[newForm][myCheckBox]" value="" />
<input id="myCheckBox" type="checkbox" name="form[newForm][myCheckBox]" value="Yes" />
Using TYPO3 7.6.13
I think you could extend the CheckboxViewHelper and add the id attribute as you needed, and then use your new VH instead.

How can I pass variables from 2 separate forms on one cfm to another cfm in coldfusion?

I have 2 forms on one page that I need to pass to the same page to assemble a pdf. How can I do that? I have tried using a action="post" for one and action="get" for the other, but I can't get that to work. I have tried assigning one form to session variables, but I can't get that either. Any suggestions??
<form name="formOne" id="formOne" method="post" action="#buildURL('goTothisPage.page')#">
<input name="name" id="name" autofocus="true" >
<input name="address" id="address" >
I would try just creating one big form instead of 2 smaller forms if the action is going to be the same and go to the same .cfm page. (Just expand the scope of your tags)
You can also create 2 "Submit" buttons (1 for each form) to make it appear as 2 separate forms, even though the buttons will submit the same form.
If it is required to have two separate forms in your html, it is also possible to forge the form values from one form into the other at the moment of the submit event.
HTML:
<form name="formOne" id="formOne" method="post">
<input name="name" id="name" type="text" >
<input name="address" id="addressHidden" type="hidden">
</form>
<form name="formTwo" id="formTwo" method="post">
<input name="address" id="address" type="text">
<input name="name" id="nameHidden" type="hidden" >
</form>
Javascript:
$(document).ready(function(){
$('#formOne').submit(function(event){
$('#addressHidden').val($('#address').val());
return true;
});
// same for #formTwo
$('#formTwo').submit(function(event){
$('#nameHidden').val($('#name').val());
return true;
});
});

Get all form controls in angularjs

What I would like to do is make all fields show their validation errors when:
visiting and modifying a field so that its dirty state is triggered (the default), and also
validating and triggering dirty when the submit is pressed
Take the following form
<div ng-form="MyForm">
<label>
<input type="text" name="numbers" ng-required="'true'" ng-pattern="/^[0-9]*$/" ng-model="numbers" />
<span class="error" ng-show="numbers.$error.required">Required</span>
<span class="error" ng-show="numbers.$error.pattern">Pattern</span>
</label>
<label>
<input type="text" name="characters" ng-required="'true'" ng-pattern="/^[a-z]*$/" ng-model="characters" />
<span class="error" ng-show="characters.$error.required">Required</span>
<span class="error" ng-show="characters.$error.required">Pattern</span>
</label>
<button ng-click="validateAndSubmit()">Submit</button>
</div>
Essentially, I would like to create a directive that validates (sets dirty to true) for all the controls in an arbitrary form. Is there a simple way to get the form controls from the FormController without finding the actual dom elements?

Aligning inputs on bootstrap using the Fluid Grid System

I am creating a form that requires the user to input their name and email address. The first line of the form has two inputs side by side for each part of the name and the 2nd line has one input for the email address that should be the same width as the first line combined. I'm trying to use the fluid grid system but can't line up the 2nd row with the first.
<form action="/subscriptions" method="post">
<fieldset>
<div class="control-group">
<label class="control-label" for="name">Name</label>
<div class="controls row-fluid">
<input class="span2" id="first_name" name="first_name" placeholder="First" required="required" type="text">
<input class="span2" id="last_name" name="last_name" placeholder="Last" required="required" type="text">
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">Email</label>
<div class="controls row-fluid">
<input class="span4" id="email" name="email" type="email">
</div>
</div>
</fieldset>
</form>​
http://jsfiddle.net/sguha095/v4amX/
Have a look a this jdfiddle: http://jsfiddle.net/kY5LL/18/
I added some div.row-fluid containers per row of your form and one extra set of inputs for demonstration.
Hope this is what you were looking for.
First we need to clean up the HTML a bit, there is an extra closing div on the first line.
I just added some classes to improve the styling so you could see how it works. The input-block-level class is a bootstrap mixin to force inputs to act like true block level elements. That's needed if you want this to be clean and to leverage the benefits of CSS. If you want to do all of your styling with HTML, then you can do so with more markup and less semantic methods, but I would recommend against it.
Hope this helps!
http://jsfiddle.net/kY5LL/12/