Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Bug using fmbadhandler with special fields realname and email

  1. #1
    Join Date
    Dec 2007
    Posts
    4

    Default Bug using fmbadhandler with special fields realname and email

    I've noticed a bug when using special fields "realname" and "email" in a form along with fmbadhandler. Entered data for these fields are not filled in when returning to the form after an error. Other input fields do get properly filled in.

    A work around for the problem is to use different names for these fields and use derive_fields to assign them to the special fields. For example:

    <input type="hidden" name="derive_fields" value="email=Email,realname=yourname" />
    Last edited by DrGlitch; 13-Dec-2007 at 10:22 PM. Reason: To corrrect an invalid assertion (duh!)

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Bug using fmbadhandler with special fields realname and email

    Hi,

    Thanks for posting this.

    It's actually not a bug. Special fields are not supposed to be repopulated by FMBadHandler.

    But, the behaviour is very annoying and requires this extra step you've posted.

    So, a future version will, in fact, allow email and realname to be repopulated by FMBadHandler. We just have to treat them as "special case" special fields.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Apr 2008
    Posts
    3

    Question Re: Bug using fmbadhandler with special fields realname and email

    Quote Originally Posted by DrGlitch View Post
    I've noticed a bug when using special fields "realname" and "email" in a form along with fmbadhandler. Entered data for these fields are not filled in when returning to the form after an error. Other input fields do get properly filled in.

    A work around for the problem is to use different names for these fields and use derive_fields to assign them to the special fields. For example:

    <input type="hidden" name="derive_fields" value="email=Email,realname=yourname" />
    I used this method solve the problem that the form was not being repopulated on return and it works brilliantly for that issue but has caused me another problem.

    When I receive the email from the form I now have two extra fields of data along with the normal data:-

    I used Email to replace email & RealName to replace realname as shown in the quote.

    The email data I receive as well as the usual data I require which is fine contains:-

    email: me@me.com
    realname: kirk
    RealName: kirk
    Email: me@me.com

    obviously the email address I have shown here is not real, just for testing but you can see that the name & email details are entered twice.
    How do I stop this from happening please?

    Kirk

  4. #4
    Join Date
    Apr 2008
    Posts
    3

    Default Re: Bug using fmbadhandler with special fields realname and email

    Quote Originally Posted by kjevans View Post
    I used this method solve the problem that the form was not being repopulated on return and it works brilliantly for that issue but has caused me another problem.

    When I receive the email from the form I now have two extra fields of data along with the normal data:-

    I used Email to replace email & RealName to replace realname as shown in the quote.

    The email data I receive as well as the usual data I require which is fine contains:-

    email: me@me.com
    realname: kirk
    RealName: kirk
    Email: me@me.com

    obviously the email address I have shown here is not real, just for testing but you can see that the name & email details are entered twice.
    How do I stop this from happening please?

    Kirk
    Got it now. I found the post about mail_options & Exclude.


  5. #5
    Join Date
    Sep 2008
    Posts
    4

    Default Re: Bug using fmbadhandler with special fields realname and email

    I have additional required fields on my form and it seems that this issue manifests itself with any required field. It certainly was not clear from the fmbadhandler documentation that required fields would not be echoed back to the form on return.

    Still the work around is great.

    Nice product, too.

    Regards

    David.

  6. #6
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Bug using fmbadhandler with special fields realname and email

    Quote Originally Posted by ac0935p View Post
    I have additional required fields on my form and it seems that this issue manifests itself with any required field. It certainly was not clear from the fmbadhandler documentation that required fields would not be echoed back to the form on return.
    Hi,

    You shouldn't have that issue with other fields ... you shouldn't have to derive all fields. Make sure that you're formatting your form fields correctly by reading the section at the top of formhandler.php called "Formatting your form fields".

    ginger

  7. #7
    Join Date
    Sep 2008
    Posts
    4

    Default Re: Bug using fmbadhandler with special fields realname and email

    I checked the formatting against the guidelines very carefully and followed the rules. I have used class=... to get styling of the controls on the form, but always done that after type=... and name=...

    The issue manifests with all REQUIRED fields, but the compute work-around also works with all of them, so at the behaviour appears consistent.

    You can find my form at

    www.normandygite.org.uk/xcms/pages/enquiry_form.shtml

    Note the use of SSI to include standard sidebar, heading, footer.

    Regards

    David.

  8. #8
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Bug using fmbadhandler with special fields realname and email

    Hi,

    If your field was originally named "arrivaldate" or "departuredate", then it should have been repopulated when returning from fmbadhandler.php, if it was filled in previously by the user (no need to rename those field names to ArrivalDate and DepartureDate). Only "email" and "realname" need to be renamed to something else, and then use the "derive_fields" hidden field so that the script knows to use the values of these 2 fields for their "special" purposes in supplying header information for the email that's sent.

    Of course, if you want the fields to be named "ArrivalDate" and "DepartureDate" because they're easier to read, then it's fine to name them that way. (It's still not necessary to use derive_fields for this.)

    The main thing is that there are no spaces in field names.

    ginger

  9. #9
    Join Date
    Sep 2008
    Posts
    4

    Default Re: Bug using fmbadhandler with special fields realname and email

    Hi

    Thanks for the response. In my original implementation, I only had the 4 required fields (realname, email, departuredate and arrivaldate). These all behaved identically and where NOT repopulated by fmbadhander.

    When I found the derive_fields work around I applied it to all 4 required fields and all 4 started to function. I am content with the work around, but stress the problem manifested against ALL 4 REQUIRED FIELDS to start with.

    Regards

    David.

  10. #10
    Join Date
    Sep 2008
    Posts
    4

    Default Re: Bug using fmbadhandler with special fields realname and email

    By the way, I have made my new version of the website live, you can find the form at:

    www.normandygite.org.uk/currentVersion/pages/enquiry_form.shtml

    Thanks!

    I have also integrated a javascript datepicker onto the form, which behaves quite well. You can get it from http://dali.mty.itesm.mx/~hugo/js/datepickercontrol/ I have fixed a few issues with the control and sent the changes on for integration into the next version. It's minimalist in approach which suits me fine - and has internationalization too, which will be great on our French language version. I have found no issues at all integrating the datepicker with this form software.

    Marvellous

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Realname plus "Submit" image map
    By coldfused in forum FormMail Subscription Support
    Replies: 14
    Last Post: 28-Jan-2006, 06:59 PM
  2. multiform/csv bug?
    By onno in forum FormMail Subscription Support
    Replies: 1
    Last Post: 06-Jul-2005, 08:44 PM
  3. Special Characters in Value String
    By hpinson in forum FormMail Subscription Support
    Replies: 4
    Last Post: 24-Mar-2005, 09:04 PM
  4. HTML Email does not work if not all fields are filled.
    By onlmega in forum FormMail Subscription Support
    Replies: 7
    Last Post: 03-Aug-2004, 11:02 PM
  5. Deriving fields from other fields
    By russellr in forum HOWTO Guides and Tips
    Replies: 0
    Last Post: 13-May-2004, 12:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •