Title: Mandatory, Fields
Last modified: March 31, 2025

---

# Mandatory, Fields

 *  [pixelnaut2025](https://wordpress.org/support/users/pixelnaut2025/)
 * (@pixelnaut2025)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/mandatory-fields-9/)
 * Mandatory fields in the contact form 7
 * Is it only possible to generate a mandatory field in an input field with the 
   attribute *.
 * I have these two fields in my contact form.
 *     ```wp-block-code
       <div class="floating-label">    [text* your-firstname id:your-firstname placeholder ""]    <label for="your-firstname">Vorname*</label></div>m <div class="floating-label">    <input type="text" name="your-surname" id="your-surname"  class="required" placeholder=" " required />    <label for="your-surname*">Nachname*</label></div>
       ```
   
 * Of course the first field is mandatory, but I have a floating animation that 
   only works in the second field. That’s why I’m asking if there is another way
   to generate mandatory fields.
 * Thanks for your help

The topic ‘Mandatory, Fields’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [mandatory field](https://wordpress.org/support/topic-tag/mandatory-field/)

 * 0 replies
 * 1 participant
 * Last reply from: [pixelnaut2025](https://wordpress.org/support/users/pixelnaut2025/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/mandatory-fields-9/)
 * Status: not resolved