This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

where is "indicates required field"


  1. vmills
    Member

    Seems like there should be some text on the form so users know what the red asterisk means, but I don't see any way to put it there. Am I missing something?

    Posted 15 years ago #
  2. Freddy
    Member

    You can add a section break at the end of the form with the text:

    * - Required fields

    and you could also use CSS to format the text.

    Posted 15 years ago #
  3. redityo

    Hi,

    Or you can add some info to asterisk by modify "view-function.php" file, goto around line 24 ~ 27 and you'll find these code :

    //check for required
    if($element->is_required){
    	$span_required = "<span id=\"required_{$element->id}\" class=\"required\">*</span>";
    }

    change to

    //check for required
    if($element->is_required){
    	$span_required = "<span id=\"required_{$element->id}\" class=\"required\">* required</span>";
    }

    it will give "reqiured" text info beside "*" for single text element


    MachForm Support

    Posted 15 years ago #
  4. awarner20
    Member

    @ redityo

    Just wanted to say thanks for this. I had a need to add this to the email and address elements and this pointed my in the exact direction:)

    Posted 14 years ago #
  5. dahrius1
    Member

    Hi,
    I know that this was posted a few years ago. Is this now the same method for adding the word "required" to required fields next to the asterisk? Has the directory structure or file names changed?
    Cheers,
    -Clint

    Posted 9 years ago #
  6. yuniar

    The code is still the same but the location most likely has been changed. Simply do a search for the same line of code.


    MachForm Founder

    Posted 9 years ago #

RSS feed for this topic

Reply