Part on Form validation finished
This commit is contained in:
parent
a597943b45
commit
ef90228439
2 changed files with 32 additions and 5 deletions
|
|
@ -13,12 +13,25 @@
|
|||
<div>
|
||||
<label for="body" class="block text-sm font-medium text-gray-700">Body</label>
|
||||
<div class="mt-1">
|
||||
<textarea id="body" name="body" rows="3" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"></textarea>
|
||||
<textarea
|
||||
id="body"
|
||||
name="body"
|
||||
rows="3"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
placeholder="Here is an idea for a note."
|
||||
//required
|
||||
><?= $_POST['body'] ?? '' ?>
|
||||
</textarea>
|
||||
<?php if (isset($errors['body'])) : ?>
|
||||
<p class="text-red-500 text-xs mt-2"><?= $erros['body'] ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-4 py-3 text-right sm:px-6">
|
||||
<button type="submit" class="inline-flex justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">Save</button>
|
||||
<button
|
||||
type="submit"
|
||||
class="inline-flex justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue