Due to job constraints, I have to do this in MVVM. I'm trying to create a scrollview that has a listview inside it and sync up the two together when I click the next scrollview arrow. It will currently show the scrollview with the initial load of the listview, but clicking the next arrow does nothing. I even tried to attach to the events but it triggers nothing. Any help is great thanks.
<div id="scrollView" data-role="scrollview" data-content-height="100%" style="width: 500px; height: 100px; max-width: 100%" data-layout="flex" data-enable-pager="false" data-binding="datasource: responses">
<div data-role="listview" data-layout="flex" data-template="responseTemplate" data-bind="source: responses"></div>
</div>
I've tried multiple ways to do the datasource binding on the scrollview. The way it currently is, I get an error that says, "Scrollview widget doesn't support datasource binding".
Here is my template:
<script id="responseTemplate" type="text/html">
<div class="alternatingColor" style="text-align: center;">
<div style="width: 3em;">
<div>
<input type="radio" value="1" data-bind="attr: {name: inputName}, checked: AuditStaticQuestionAnswerId, enabled: canChangeResponse" />
</div>
<div>
<input type="radio" value="2" data-bind="attr: {name: inputName}, checked: AuditStaticQuestionAnswerId, enabled: canChangeResponse" />
</div>
<div data-bind="visible: IncludeNAChecked">
<input type="radio" value="3" data-bind="attr: {name: inputName}, checked: AuditStaticQuestionAnswerId, enabled: canChangeResponse" />
</div>
</div>
</div>
Before anyone suggests it, the script tag with type text/html works fine for a template. Also it's a requirement to use it. So, no x-kendo-template.
Here is a jsfiddle of the code https://jsfiddle.net/0jp6m38y/1/
Note: some of the js is a little different, but close enough to show you how I see it.
Related
I have a WordPress website with a bar at the top that I can add custom code to.
I'm trying to add an Infusionsoft email signup form to this bar and I want everything to be on the same line. Currently it's showing the field label on the first line, then the email field on the second line and then the submit button on the third line.
I can add whatever code I need to this form and this custom code box and I can also add custom CSS to the theme options themselves.
I've tried a bunch of things and some of them almost work but I can't figure this out.
Any help would be greatly appreciated.
Here's my form code:
<form accept-charset="UTF-8" action="https://ca383.infusionsoft.com/app/form/process/647e604918a3f0a0c52cd6b907f9d7d3" class="infusion-form" id="inf_form_647e604918a3f0a0c52cd6b907f9d7d3" method="POST">
<input name="inf_form_xid" type="hidden" value="647e604918a3f0a0c52cd6b907f9d7d3">
<input name="inf_form_name" type="hidden" value="Web Form submitted">
<input name="infusionsoft_version" type="hidden" value="1.70.0.80421">
<div class="infusion-field">
<label for="inf_field_Email">Sign Up For Weekly Tips and Specials Offers!</label>
<input class="infusion-field-input" id="inf_field_Email" name="inf_field_Email" placeholder="Email *" type="text">
</div>
<div>
<div> </div>
</div>
<div class="infusion-submit">
<button type="submit">Submit</button>
</div>
I moved the infusion submit div inside the infusion field div. I used display flex and flex-direction row to achieve them on the same row.
I know you're using word press and probably just copy and pasting code. If you plan to do web design work it would be well worth it to study up on HTML and CSS. It's actually not that complicated and you'll have so much control over how things look on your site!
*Edit to center content
<form accept-charset="UTF-8" action="https://ca383.infusionsoft.com/app/form/process/647e604918a3f0a0c52cd6b907f9d7d3" class="infusion-form" id="inf_form_647e604918a3f0a0c52cd6b907f9d7d3" method="POST">
<input name="inf_form_xid" type="hidden" value="647e604918a3f0a0c52cd6b907f9d7d3">
<input name="inf_form_name" type="hidden" value="Web Form submitted">
<input name="infusionsoft_version" type="hidden" value="1.70.0.80421">
<div class="infusion-field" style="display:flex; flex-direction: row; justify-content: center;">
<label for="inf_field_Email">Sign Up For Weekly Tips and Specials Offers!</label>
<input class="infusion-field-input" id="inf_field_Email" name="inf_field_Email" placeholder="Email *" type="text" style="margin-right: 10px;">
<div class="infusion-submit">
<button type="submit">Submit</button>
</div>
</div>
</form>
How can I perfectly align and space my inline inputs forms in bootstrap
<div class="form-group col-lg-12">
<div class="col-lg-6">
<input type="text" class= "form-control" value="First Name">
</div>
<div class="col-lg-6">
<input type="text" class= "form-control" value="Last Name">
</div>
</div>
Use col-xs instead of col-lg
see this for a try
And keep all your input inside the
`<div class="form-group col-xs-12">`
I don't quite understand our question very well, maybe a picture to illustrate what you want to achieve would be helpful.
I have basically wrapped everything with a column-xs-12 so its perfectly aligned. Also included an example if you want to place two input forms on one line. I have made a plunk to help you out, hope it helps.
<div class="col-xs-12"> </div>
http://plnkr.co/edit/lj866U6QlvbLKhF4jujI?p=preview
I would like for the user to be able to drag the modal box to a different position, like how it can be done with the JQuery UI dialog.
I found on the official Semantic-UI documentations, there is the setting "detachable" for modal, which seems to have the description I'm after. However, even setting it to true doesn't seem to let me drag the modal around. Could someone please help me on this?
Here's the code thus far:
var aFunction = function()
{
$('.modal').modal({detachable: true, closable: false, transition: 'fade up'});
$("#aBtn").on("click", function(){
$('.modal').modal('show');
});
}
$(document).ready( aFunction );
<div class="ui basic large modal">
<i class="close icon"></i>
<div class="header">
Archive Old Messages
</div>
<div class="content">
<div class="image">
<i class="archive icon"></i>
</div>
<div class="description">
<p>Your inbox is getting full, would you like us to enable automatic archiving of old messages?</p>
</div>
</div>
<div class="actions">
<div class="two fluid ui inverted buttons">
<div class="ui red basic inverted button">
<i class="remove icon"></i>
No
</div>
<div class="ui green basic inverted button">
<i class="checkmark icon"></i>
Yes
</div>
</div>
</div>
</div>
Semantic UI does not support draggable modals at the moment like JQuery UI does.
Default value of Detachable option is already true, which means that if you open a new modal the previous one will be moved to the background (= dimmer) and is not usable anymore (visualised with darker color).
I'm trying to draw an horizontal form that should be horizontal even on mobile view.
Currently I have this simple form:
<form role="form" class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label" for="username">{{_USERNAME}}:</label>
<div class="col-sm-10">
<input type="text" readonly class="form-control" id="username" value="{{username}}">
</div>
</div>
</form>
It works correctly as expected, so it is horizontal on large screens and classic on small screens.
Current:
Expected:
How can I force this form to be horizontal even on small screens? Do I have to write CSS by myself or there is some standard way using Bootstrap?
Okay I've found the solution.
Use col-xs-* instead of col-ms-*
<form role="form" class="form-horizontal">
<div class="form-group">
<label class="col-xs-2 control-label" for="username">{{_USERNAME}}:</label>
<div class="col-xs-10">
<input type="text" readonly class="form-control" id="username" value="{{username}}">
</div>
</div>
</form>
Since non of the above met my needs. I drawed a table and inserted the label inside a td and the input in the next td. All within the same row. Finally adjusted the margins as needed.
Note: This worked for an exclusive mobile UX.
I want to use html input elements in twitter bootstrap. I have a label on the left and an input element on the right. I pretty much used the example given in the bootstrap documentation. But my problem is that I don't have IDs for every input element and so I can't specify the "for"-value of the labels.
My solution in previous projects was wrapping the input element with a label, but this results in a wrong styling when I use bootstrap.
<div class="control-group">
<label class="control-label">MyTitle:
<div class="controls">
<input type="text" value="..." />
</div>
</label>
</div>
Will this work for you?
<div class="control-group">
<div class="controls">
<label class="control-label">MyTitle:
<input type="text" value="..." />
</label>
</div>
</div>