Results 1 to 4 of 4

Thread: sample application questions: AJAX and forms

  1. #1
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default sample application questions: AJAX and forms

    In the editview, the user types in the name and date. Then types in few letters to retrieve the name of the forms.
    Then upon typing the appropriate name (say form1) , The editview loads form1.html while the editview.php has logic to load the form.

    I was able to do it for 2 forms using a drop down. But I don't like the solution. I have 100+ forms. I prefer a AJAX solution, not a drop down. or I also tried something similar to the select button we have in Sugar. But it requires it be to a module. I was hoping to have a non-module approach.

    any ideas are greatly appreciated

  2. #2
    WayneSugar's Avatar
    WayneSugar is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    155

    Default Re: sample application questions: AJAX and forms

    you don't need to retreive anything for this function. (it you don't need to call the server for anything, this can be done client side). Just pass all the form names down and create a javascript widget that filters this list.
    Wayne Pan
    Software Eng.

  3. #3
    sugarcare is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    405

    Default Re: sample application questions: AJAX and forms

    You mean pass all the 100+ form names (files) and it's layout ? or just names? This is what I meant.

    Category: _________
    Description: __________
    Form_name:_________ [Button to select or AJAX] // Loading the form name, retrieves html elements

    If form1 is entered.

    Form1.html

    Category: __________
    Description: __________
    checkbox
    Textfield
    dropdown
    save Button

    If form2 is entered,
    Category: __________
    Description: __________
    dropdown
    save Button


    and so on. Remember category and Description will remain the same across all html forms.
    It would be inefficient to pass all the forms to the client.

  4. #4
    WayneSugar's Avatar
    WayneSugar is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    155

    Default Re: sample application questions: AJAX and forms

    pass all the forum names down. If you want to retrieve the actualy forms via AJAX that's another matter.

    I don't know you're use case but would it be bad to have them select the form and then post that information back to the server and handle everything on the php side?
    Wayne Pan
    Software Eng.

Thread Information

Users Browsing this Thread

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

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
  •