SuiteCRM turn ON autocomplete on email recipient field - autocomplete

I'm trying to remove the autocomplete="off" attribute from the input field for the email recipient field
The code of the input field is as follows:
<input
class="ac_input yui-ac-input"
size="96"
id="addressTO1"
title="An"
name="addressTO1"
onkeyup="SE.composeLayout.showAddressDetails(this);"
autocomplete="off" type="text">
Is there a setting that can be accessed via the GUI that changes the behaviour of the email "to" field or what would be the best way to turn on the autocomplete functionality.
Just removing it does not work, as there is some javascript functionality there, that keeps bringing it back.
I'm using suiterCRM version 7.6.5
Sugar Version 6.5.23.

There is no GUI for changing that, the autocomplete=off is hardcoded.
The TO field (addressTO1 dynamically generated name) is not a regular text input field, it will support multiple emails separated by comma, so a autocomplete="email" will not work.
The only solution I could come up with is for you to create a javascript function and attach to the keyup event of the field and show your logic.
Also you will need to save previously filled input with the answers and provide a mechanism to delete that. Not an easy solution I am afraid.

Related

A particular scenario doesn't gets recorded in Selenium IDE

I have a field where numerals can be entered in a particular way only. It will allow only 4 numerals. Initially the field is blank.
On clicking inside the field there is a separator **:** After entering numerals it will be like 12:12. I don't know to mention what type of text box it is (Like autocomplete or free form)
While recording using IDE these actions are not getting recorded. I tried to write by my own. But cannot see any helpful links. I'm a newbie to Selenium.
Checked using F12.
Can see as below
<input value ="" tabindex="10" maxlength="5" data-type="time" class="FormField textbox1" onfocus="return addTimePicker(this)" onblur="return checkTime(this)" type="text">
I got a solution like this :
Command : type
Target : xpath=/html/body/form/div[4]/div[4]/table/tbody/tr[4]/td/table/tbody/tr/td[1]/table[1]/tbody/tr/td/div/table/tbody/tr/td/div/div[2]/div[2]/ul/li[2]/input[1]
Value :
1010
Then I need to write another command again. Else the value wont be retained. Field is restricted in such a way.
Command : click
Target : xpath=/html/body/form/div[4]/div[4]/table/tbody/tr[4]/td/table/tbody/tr/td[1]/table[1]/tbody/tr/td/div/table/tbody/tr/td/div/div[2]/div[2]/ul/li[2]/input[1]
Is there any way to combine these two commands. The action i would like to perform is type in and then click inside the same field.

Is there a way to deliberately make a form field that doesn't submit?

A lot of folks on Stack Overflow are probably trying to fix forms that don't submit, but I'm actually hoping to do the opposite!
What I'd like to do for an art project is make a form with a "joke" field -- say, your SSN, your bank account number, your fingerprints or retina scans or DNA code, or something super personal like that. But I don't want the number in our server logs, and I don't want it to be transmitted over the internet at all. I don't want any legal liability!
Basically the idea is just to ask for something audacious, but not to handle the data that may or may not come from users who actually put it in.
So, is there a way to make a field that acts as a normal form field, but where nonetheless we would feel "safe" that users who actually do put their sensitive info in the field will be protected?
What's the "safest" approach to something like this?
Form fields require a name to be submitted:
If any of the following conditions are met, then skip these substeps for this element:
[…]
The field element is not an input element whose type attribute is in the Image Button state, and either the field element does not have a name attribute specified, or its name attribute's value is the empty string.
[…]
So you could simply use an input without name attribute:
<input type="text">
Be careful with your "jokes", if you want that the information of the field is not submitted, then, you can simply leave it out of the form element like this:
<form action="... >
<input type="... >
</form>
<input type="... > <!-- This field won't be submitted-->

drupal form textfield name -value changed and does not validate any more

i have a checkout-page (drupal commerce) form with an address section generated by the module addressfield. currently all text-inputfields have this markup-structure:
<input class="last-name" id="edit-last-name" name="customer_profile_billing[commerce_customer_address][und][0][last_name]">
class + id + name
with this config they validate.
if i change the value of the name attribute the form doesnt validate anymore, the form says:
field XY is required
the form-validator obviously doesnt recognise my inputs.
question: how can i get the validation process to work with a modified name attribute?
You should not be altering the generated HTML in any way. Drupal provides a special way of handling forms and a special way to alter other modules forms. To change the form you should use the configuration options presented to you by the module. If those are insufficient you should create your own Drupal module and then implement hook_form_alter to change the other form. You will need to understand Drupal's hook system.

validating radiogroup with perl/cgi

Is it possible to validate a radio group (so something is checked off, or chosen) using server-side validation with Perl? If so, how?
I already have it for JavaScript, but I want this form to be able to be submitted even without JavaScript enabled. Thus I will need the validation on the server-side.
There is no fixed name for the radio group, it can change, however there must be a name, so that #names = $cgi->param() will give all the names.
I'm thinking along something that will give me the type, like the type in JavaScript, to determine if it's a radio button in a group.
Your CGI script receives form fields as name-value pairs without any information as to what type of visual form element generated the values.
Your CGI script must know the names of the input variables whose values it is going to validate. Having the names supplied to the script based on untrusted user input is risky IMHO—that includes using another field whose value is the name of the radio group.
Say, you have a variable called contact_me which can take on values "yes" and "no". There is absolutely no reason for your CGI script to care if the value was provided using
<select name="contact_me">
<option value="yes" selected="1">Please do!</option>
<option value="no">Oh no!!!</option>
</select>
or using
<input type="radio" name="contact_me" value="yes" checked="1">
<input type="radio" name="contact_me" value="no">
or if the user typed her answer into the text field
<input name="contact_me">
The only thing your CGI script needs to concern itself with is if the value of contact_me is "yes" or "no".
It looks like you do not have a firm grasp of CGI. Please see The World Wide Web Security FAQ: CGI (Server) Scripts as a starting point.
Please stop all of your CGI development until you understand the ramifications. I retract this remark in light of your comments clarifying the use of a config file to define parameter names (which, in principle, is orders of magnitude safer).
Pass another hidden input field containing the name of the radiogroup, then just read
#values = $cgi->param($cgi->param("radiogroup_name")); // IIRC

Problem about the customised validation rule using regular expression in JQuery

I have a form having some text boxes, radio buttons, and select boxes. I write custom validation methods which i added using validator.addmethod.
If user submitted this form keeping some or all fields empty then form should get submitted but if user enters data in text boxes then data should be alphabetic and should not contain special character and numbers.
I write validation code for some text boxes for which the custom validation code as I mentioned above is as follows.
$.validator.addMethod('specialchar', function (value) {
return /^[^a-zA-Z]$/.test(value);
}, 'First Name should not contain special characters.');
**Now actually when user submits form with empty fields then error messages of above custom validation method is displayed for those textboxes to which above method is assigned **
I think there is also problem in my regular expression which i can not able to spot.
If my regular expression is right then is there any other method to add regular expression in JQuery i.e. lookahed regular expression.
Please help me on these two problems guys
Thank You
Maybe something more like this:
/^[^a-zA-Z]{0,}$/