# Input

```html
<label for="name">Name</label>
<input
  type="text"
  id="name"
  name="name"
  class="w-input"
  data-name="Name"
  maxlength="256"
  placeholder=""
/> 
```

## Programming support&#x20;

### Pseudo-required inputs&#x20;

In some cases we may need a form element to appear readonly/disabled, but to still perform standard form validations.  Currently that does not happen if an element is readonly or disabled ( Chrome ).&#x20;

e.g. Input Element&#x20;

```
    if(tourAid) { 

      const tourDateElement = document.getElementById('tour-date') as HTMLInputElement;
      if (tourDateElement) {

        // Prevent user editing by blurring on focus
        tourDateElement.onfocus = () => tourDateElement.blur();

        // Also make it non-clickable via CSS
        tourDateElement.style.pointerEvents = 'none';

          // Optional: add styling to indicate it's non-editable
        tourDateElement.style.backgroundColor = '#f5f5f5';

//        tourDateElement.readOnly = true;
      } 
```
