Skip to main content
Known Participant
June 15, 2009
Question

Change form entry

  • June 15, 2009
  • 1 reply
  • 430 views

I need to change form a form entry in a ColdFusion 8 page.

The entry will have a firstname and lastname.

An example might be an an entry of Joe Smith which I need to change to Smith,Joe

My attempt below is not working:

REReplace("originalEntry","$1/s$2","$2,$1","ALL")

Please advise.

    This topic has been closed for replies.

    1 reply

    Inspiring
    June 15, 2009

    NewVar = ListRest(form.name, chr(32)) & ", " & ListFirst(form.name, chr(32));

    You probably want to add some if/else logic just in case the person really entered lastname, firstname.

    Better yet, change your form and have two textboxes instead of one.