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

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Required Field Problem


  1. smailek
    Member

    I think there is a problem in required field.If form has save and resume ability, then required field prevents this ability because there is a same record (at least required field) in database.

    Posted 12 years ago #
  2. yuniar

    Can you explain more regarding the issue please? Do you mean you can't save the form when the form has required fields?
    An URL to the form would be very helpful.

    You can contact us directly if you don't want to post the URL here.


    MachForm Founder

    Posted 12 years ago #
  3. smailek
    Member

    I am so sorry not required field it is "no duplicate field". I have a form with a no duplicate field like SSN. Users can fill the form including SSN and then save it. But they can not resume form because there is same record in database and there is a warning about no duplicate field.

    Posted 12 years ago #
  4. smailek
    Member

    hi yuniar could u look at this problem? thank you

    Posted 12 years ago #
  5. yuniar

    Sorry for that! I missed your last reply.
    Anyway, I've checked and this is a bug indeed. Thank you for reporting this.

    Fortunately the quick is very simple. You can edit your "includes/common-validator.php" file, search around line 43 for this code:

    $query = "select count($element_name) total from ".MF_TABLE_PREFIX."form_{$form_id} where {$element_name}=?";

    change it to become:

    $query = "select count($element_name) total from ".MF_TABLE_PREFIX."form_{$form_id} where {$element_name}=? and resume_key is null";

    that should fix it.


    MachForm Founder

    Posted 12 years ago #
  6. smailek
    Member

    Yeah it fixed Yuniar. Thank you

    Posted 12 years ago #

RSS feed for this topic

Reply