I am wondering, is it somehow possible to use <fx:constant> in an attribute instead of a separate tag?
Currently this works for me:
<Label>
<text>
<MyController fx:constant="MY_CONSTANT_STRING" />
</text>
</Label>
while I would prefer something like this:
<Label text="<MyController fx:constant="MY_CONSTANT_STRING" />" />
Is something like the later possible?
Thanks for any hint!
Related
I need to change text color in CSS. How do i target text Website like in this example:
<input type="checkbox" id="website" name="website" value="website">Website<br>
What is the proper way, to wrap it in something like <div> ?
Wrapping in the <label></label> does the trick.
Bit confusing and could not find any related issues online. As can be seen in the screenshot, when using the Chrome Autofill it is filling up the wrong input, even though the input have different ids.
This is using knockout template but not sure if its related.
HTML code for Billing Address
<input data-bind="value: $data.editor.SearchHouseNumber, uniqueId: $data.editor.SearchHouseNumber, valueUpdate: ['blur', 'afterkeydown', 'onload'], css: $data.editor.labelClass" maxlength="100" name="customerSearchHouseNumber" placeholder="House no." size="24" type="text" value="" title="" id="fld2">
HTML code for Delivery Address
<input data-bind="value: $data.editor.SearchHouseNumber, uniqueId: $data.editor.SearchHouseNumber, valueUpdate: ['blur', 'afterkeydown', 'onload'], css: $data.editor.labelClass" maxlength="100" name="customerSearchHouseNumber" placeholder="House no." size="24" type="text" value="" title="" id="fld17">
As far as I can tell, Chrome actually implements the full autocomplete spec here, which means you should be able to specify which type of data Chrome should use to fill in the fields. Therefore, you can add the following attributes to your inputs:
autocomplete="billing street-address" and autocomplete="shipping street-address", and Chrome will likely be able to supply the correct values.
Note that street-address designation can take multiline values (as per spec), so you may prefer address-line1.
Example:
<input name="billing_address" id="fld2" autocomplete="billing street-address">
When I try to write something like this: <html:text styleId="Istituto" type="number"> in the struts1 it gives me an error
Attribute type invalid for tag text according to TLD
How can I add "type" attribute to <html:text> tag?
I know this is old, but I'm currently working on a super old application that uses Struts 1 framework, and today I had the same problem. Here's the solution I'm using that works:
<input type="number" name="budgetValue"
value="<bean:write name="applicantForm" property="budgetValue"/>">
Where:
budgetValue - is the Form property; applicantForm - is the Form
Thanks to Milebza for the answer, but for me only this way has worked.
<input type="number" name="budgetValue" value="${applicantForm.budgetValue}" />
I've got a problem with the contact form in Expression Engine. I'm using the code from the docs but after submitting I'm getting this error :
This form has expired. Please refresh and try again.
My code:
{exp:email:contact_form user_recipients="no" recipients="my#emailadress.com" charset="utf-8"}
<h2>Support Form</h2>
<p>
<label for="from">Your Email:</label><br />
<input type="text" id="from" name="from" size="40" maxlength="35" value="{member_email}" />
</p>
<p>
<label for="subject">Subject:</label><br />
<input type="text" id="subject" name="subject" size="40" value="Contact Form" />
</p>
<p>
<label for="message">Message:</label><br />
<textarea id="message" name="message" rows="18" cols="40">
Support Email from: {member_name}
Sent at: {current_time format="%Y %m %d"}
</textarea>
</p>
<p>
<input name="submit" type='submit' value='Submit Form' />
</p>
{/exp:email:contact_form}
I'm using Expression Engine 2.8.0. Thanks guys!
EE requires an XID to be in the form. There is a global variable you can use to generate an XID hash:
<input type="hidden" name="XID" value="{XID_HASH}" />
http://ellislab.com/blog/entry/putting-the-secure-in-secure-mode-forms
For us, adding this to the config.php 'fixed' the problem (more like, put a bandaid on it since it's not an ideal situation)
$config[‘disable_csrf_protection’] = “y”;
I was having this problem only in Chrome and not in Firefox or Safari. I dug into the PHP and realized that it failed this check in Csrf.php:
// Fetch data, these methods enforce token time limits
$this->fetch_session_token();
$this->fetch_request_token();
// Main check
if ($this->request_token === $this->session_token)
{
return TRUE;
}
Then I realized that I had set Chrome to block cookies. I set it so Chrome would allow cookies and I am no longer getting that error message.
I think that's a problem with the secure forms XID hash. You can only submit a form once while using "secure forms" (to stop spammers hijacking them).
A quick way of disabling it is to open system/expressionengine/config/config.php and add this down the bottom to disable it. See if that makes a difference for you.
$config["secure_forms"] = "n";
Obviously using secure forms is preferable though.
I would like to change the the "return" button text on the Mobile Safari keyboard when my input element is focused. I know you can do this:
<form action="somewebsite.com">
<input id='SearchTextBox' type="search"/>
<input id='SearchButton' type="button" value="Search" />
</form>
But I don't want the form tag because the search is ajaxian (I don't want to reload the page).
Does anyone know if this is possible?
Heh, should have thought of this (coworker solved). Just cancel the form submission with JavaScript. For example:
<form action="#" onsubmit="return false;">
<input id='SearchTextBox' type="search"/>
<input id='SearchButton' type="button" value="Search" />
</form>
You can now use enterkeyhint
<input enterkeyhint="search" />
Theres more options like "send", "go", etc