Announcement

Collapse
No announcement yet.

Modal form question

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Modal form question

    I have a form that captures basic information for a business. Name, address, banking information, etc. I also allow the user to enter up to 5 trade references for the business. These references are sometimes shared by many companies. So rather than have the user type it in each time I have a reference They do that by entering in a reference phone # which uses ajax to lookup the reference in another table and if it finds it I populate the related fields on the form. This all works perfectly.

    What I need to know how to do is popup a modal 'trade reference maintenance' form when the phone # search doesn't return a hit. I need the user to have the ability to add a new record to the reference table or search different ways and then let them select the record and return it to the form they were already working on. I have the modal form working, except for the select and return piece.

    So my question is I guess, is it possible to search and edit a table in a modal window while not interfering with the edit that's in progress on the calling form and if so, how do I do this.

    I'm pretty sure this is possible because of the ajax examples I've seen using select fields. But this is not a select field and that's what's throwing me off a bit.

    Thanks in advance for any suggestions!

    Ted

  • #2
    Hi Ted,

    did you try the "capture link" to another form that have the second data you are talking about?
    there is select button also you can select from there and it will return that data to the previous form and closes that "modal" form

    just a though...
    http://www.scriptcase.net/scriptcase...-to-use-links/

    Comment


    • #3
      Thanks for your suggestion. Yes that is exactly what I was looking for!

      Ted

      Comment


      • #4
        This works great. The # returned is for example, 80055551212. My related fields are updated via an onchange ajax event which works with the data returned or with data the user types in without using the capture link. My only problem now is I need to refresh the field so that the template shows up in the display. I need it to show is 800-555-1212 for example. If I cut and paste a string of 8005551212 into the field it automatically puts in the template dashes but returning from a capture link does not. Also if I do CTRL A while in the field it automatically puts in the template. Any idea?

        Another option would be to store the dashes in my lookup table but then I don't think I can force the template to validate the field without ending up with too many -'s.

        Thanks

        Ted

        Comment

        Working...
        X