How to show Datetime Field in odoo Front end Website. i tried various ways but it not possible. <input type="datetime"/> it's not working in odoo website.
need help.
Try
<input type="datetime-local"/>
<!DOCTYPE html>
<html>
<body>
<p>
Depending on browser support:<br>
A date picker can pop-up when you enter the input field.
</p>
<form action="/action_page.php">
Birthday (date and time):
<input type="datetime-local" name="bdaytime">
<input type="submit" value="Send">
</form>
<p><strong>Note:</strong> type="datetime-local" is not supported in Firefox, or Internet Explorer 12 and earlier versions.</p>
</body>
</html>
I The input type datetime-local is not supported on all browsers. so in odoo better would be store the data in a text field. or you can use any custom libraries for datetime picker.
Related
Well, I am new to selenium and trying to automate some form pages.
I was trying to locate and select the field below I pasted, but name and ID are changing every time the page loads. Is there any way to select that field with selenium?
I am using python btw in case that changes anything.
<dd>
<input type="text" class="input" name="0e9c304b1edf4e01c023790b6ee5442ac6663bf6" autocomplete="username" required="required" autofocus="autofocus" maxlength="25" id="_xfUid-4-1583549932">
</dd>
You can use the following xpath:
//dd/input[#class='input']
if there are other inputs then
//dd/input[#class='input'][1]
or you can try
//dd/input[#autocomplete='username']
I have created a dashboard which has few input pickers and different panels. When I export to PDF, only the charts are getting exported. I need the URL getting generated on clicking the "Open Search" button available at the right bottom of interactive chart needs to get exported to PDF.
If possible the queries needs to be invisible in splunk dashboard.
Thanks in advance.
You can include the value of the tokens in a html panel, which can be used to then show the query that is being run. Take a look at the following example.
<form>
<label>SO Test</label>
<fieldset submitButton="true">
<input type="text" token="idx">
<label>Index</label>
<default>*</default>
</input>
</fieldset>
<row>
<html>
<pre>index=$idx$ | stats count by source</pre>
</html>
</row>
<row>
<panel>
<chart>
<search>
<query>index=$idx$ | stats count by source</query>
<earliest>-24h#h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="charting.chart">pie</option>
<option name="charting.drilldown">none</option>
<option name="refresh.display">progressbar</option>
</chart>
</panel>
</row>
</form>
In your case, you may have multiple panels, and each panel may have a different query. You can use multiple html elements, or just put the values of the token at the start.
this issue happened when a input DOM with placeholder in Sitecore Experience Editor, does someone know how to solve this?
<div class="form-group">
<input class="form-control" placeholder="#Html.Sitecore().Field("Placeholder_Test")" value="123" />
</div>
Thanks
When Sitecore renders #Html.Sitecore().Field in Experience Editor mode, it adds extra html layout around the field value to allow content authors to edit the text.
So your generated output is something like that:
<input class="form-control" placeholder="<code attr="blah">aa</code><span>this is a text</span>" value="123" />
As you can see, this is not a valid html. And that's why you see incorrect output in Experience Editor.
What it means? That you cannot edit attributes of inputs inside Experience Editor using #Html.Sitecore().Field.
The simplest solution is to just render the value there, like (replace Sitecore.Context.Item with your datasource if needed):
<input class="form-control" placeholder="#Sitecore.Context.Item["Placeholder_Test"]" value="123" />
And to use Edit Frame to allow editing the placeholder text ( https://www.google.com/search?q=sitecore+edit+frame )
In the bigcommerce control panel, you are given the option to
add extra fields to the customer registration form.
This is shown in the control panel when Editing a customer record. They
show up, in the rendered html as this kind of thing:
<div class="field formRow ">
<label for="FormField_24"><span class="FormFieldLabel">FIELD NAME</span>
...
</label>
<div class="field-group value">
<input type="hidden" value="24" class="FormFieldId">
<input type="hidden" value="1" class="FormFieldFormId">
...
<input type="text" value="FIELD VALUE" class="field-xlarge FormField"
name="FormField[1][24]" id="FormField_24" ...>
</div>
</div>
However, walking the records with the Customer API doesn't show any of these extra fields.
Is there is anything in the Bigcommerce API that will let me access these custom customer form fields?
Update:
There are some older questions about this, that I didn't spot in searching (here, and here).
Given that those questions are from January & July last year, and still have no solution, it looks like this is simply a gap in the API. Damn.
I'm building a view in splunk, and want to show a timechart. However, I would like to only show data for the last 24 hours, not the last week splunk defaults to. How do I do this?
When I'm just doing a search I can select the time span at the top of the page, but that isn't available when creating a dashboard chart.
Actually ,in Simple XML, if you use a "form" element rather than a "dashboard" element , then you can use a time range picker.
<form>
<label>My Lovely Splunk View</label>
<fieldset autoRun="true">
<input type="time" searchWhenChanged="true">
<default>Last 60 minutes</default>
</input>
</fieldset>
<row>
<chart>
<searchName>My Search</searchName>
<title>Cool Chart</title>
<option name="charting.chart">line</option>
</chart>
</row>
</form>