3 Replies Latest reply on Mar 8, 2010 12:58 PM by Adam Cameron.

    Accessing form fields with [brackets] in the name

    tsongas
      Wondering if anyone has ideas for accessing form field values when the fieldnames include brackets like the ones in the cfdump of a form post shown below (it’s a MailChimp webhook)?

       

      When I try to access the values using #form.data[list_id]# for example, I get a ColdFusion error, I’m guessing because it thinks I’m trying to access an array element. Any help appreciated.

       

      struct

      DATA[LIST_ID]

      000000000

      DATA[NEW_EMAIL]

      foo@bar.com

      DATA[NEW_ID]

      000000000

      DATA[OLD_EMAIL]

      foo@bar.com

      FIELDNAMES

      TYPE,FIRED_AT,DATA[NEW_ID],DATA[NEW_EMAIL],DATA[OLD_EMAIL],DATA[LIST_ID]  

      FIRED_AT

      2010-03-08   17:49:09

      TEMPID

      [empty   string]

      TYPE

      upemail