Required response answer in Mechanical Turk - html

I am designing my task in MTurk and have tried to create a field with the required answer.
That is my code:
<crowd-input name="Comment" placeholder="Explain why" required></crowd-input>
The problem is that submitting the task without filling any text in the sandbox allowed me to do so. I want this text box to be required.
Any suggestions?

I found solution:
<input type="text" placeholder="Explain why" required></input>

Related

HTML - how to clear data validation once error has been removed

I am making a cloud page and have set an alphabetic data validation in html which is working fine in that a user cannot enter anything other than letters.
The issue I am now having is that the data validation doesn't go when the error has been corrected i.e. the user cannot submit the page.
The code snippet is below. Please can someone give me a steer on how to rectify this? I have tried onblur but it didn't work.
Thanks in advance!
<input pattern="[A-Za-z\s]*" oninvalid="setCustomValidity('Please enter your first name')" name="Firstname" class="answer_box" placeholder="Enter your first name">
With setCustomValidity() the field is invalid. You have to clear the validation:
oninput="setCustomValidity('')"
As mentioned in this documentation.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/setCustomValidity

How Do I Do a Read-Only Area On A Textarea In HTML?

I am trying to create a textarea where it shows text but when you click on it and write something the text disappears. For example, on some websites is says "Search" on the textbar and when you click it and write something, the text disappears (like Google). Here is the code that i wrote:
<textarea style="resize:none;" cols="35" rows="1" wrap="virtual">Search</textarea>
Sadly this code didnt work. It just writes some text on the textarea and it doesn't create a read-only text. I did my research and i couldn't find a question with a answer to my question. They were either not about HTML or they were about other things and not read-only. So can someone please help me with this? Thank you for your time. Have a wonderful day.
You can use the placeholder attribute.
<textarea style="resize:none;" cols="35" rows="1" wrap="virtual" placeholder="Search"></textarea>
You can use the placeholder attribute for that:
<textarea style="resize:none;" cols="35" rows="1" placeholder="Type something..." wrap="virtual"></textarea>

How do I disable or prevent input text suggestions for form fields in Edge?

How do I prevent a form from suggesting auto-complete values, from previous entries or from saved information in Edge?
In the above image, the email input field is marked as autocomplete="false", but still in the right pane you can see the suggestion is populating.
When I add autocomplete=disabled to one field it seems it work, but when I add the attribute to all the inputs, it again starts displaying suggestions for every field.
What is the solution for this?
Add the aria-autocomplete="list" attribute to the input.
<input type="text" id="FirstName" name="attr1" aria-autocomplete="list">
Do not use any other value for the attribute.
According to your description, I reproduced the problem. I think your issue is caused by the "Save and fill personal info" setting being enabled in Edge.
If you navigate to edge://settings/personalinfo and disable this feature, you can see this behavior no longer exists.
Or you can also click the "Manage personal info" option in the picture you provided, and then disable it.
I did some simple tests and found that if you need to solve the problem from the code, you need to modify the name attribute of the form's related field.
Like this(do not use attribute values like name or email... and maybe there are others I am not aware of):
<label for="attr1">attr1:</label>
<input type="text" id="FirstName" name="attr1">
<label for="attr2">attr2 :</label>
<input type="text" id="LastName" name="attr2">
<label for="attr3">attr3 :</label>
<input type="email" id="Email" name="attr3" autocomplete="off">
<input type="submit">
I don't recommend this, because good naming helps you understand and maintain the code. Using proper attributes like name and email also helps your code be more accessible for screen readers or other assistive technology.

How to not change page when the login fields are empty

i'm adding a login system to my website i've figured out how to change pages but even if my login fields are empty when i click on my login button it changes page like i'm logged in while i'm not. Before adding the a href='index.html' when i was clicking the login button the site told me that i needed to fill the login field but now when i click even if the field are empty there's no error message and it changes page.
sorry if my explanations are a bit messy if you need more infos tell me ! :)
here's my code :
<form>
<input type="email" class="input-box" placeholder="Email" required>
<input type="password" class="input-box" placeholder="Password" required>
<button type="submit" class="submit-btn">Login</button>
<input type="checkbox"><span>remember me</span>
</form>
You can use several options to fix your problem.
As some others already suggested you can use JavaScript to validate the content of your input field. This is only on the client and wil leave your server still vulnerable to attacks. You should do a server validation too, with PHP for example and to be 100% safe a constraint validation for the database.
You could simple set constraint inside the HTML Tags:
(min-length, max-length, pattern(RegEx))
and so on.
Check the W3Schools site for more detailed information.
I would still use the aditional option from 1) to be safe!

Magic Form in OctoberCMS

I've being trying to edit some fields in the Magic Form plugin in OctoberCMS, but i'm facing some dificulties. I want to change the "recipient" that is going to receive all the information on the form in his email. But everytime i open the field "recipient", it has this html code inside. Heres a print showing it:
"Destinatários" is the portuguese translation for "Recipient", where i should be able to write down an email, and should be good to go. However, everytime i open it, it has the same code inside, doesn't matter if i delete it.
To fix this issue you need to change core OctoberCMS file
Source : https://tutorialmeta.com/october-cms/magic-forms-octobercms-bug-fix-solution
modules\system\assets\ui\storm-min.js (approx line no: 5808)
Before
After
This
<textarea class="form-control size-small field-textarea" name="name">
</textarea>
To This
<textarea class="form-control size-small field-textarea" name="name" value=""/>
It will fix your issue
if you have any doubt please comment.
Just remove that html and add the email addresses you want (each address on a new line)