Announcement

Collapse
No announcement yet.

Saving html forms content

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

  • Saving html forms content

    Hello,
    My project requires to many inputs, checkbox etc...
    So I decided to create some html forms and show it into and iExplorer plugin to let the user complete it. The problem is how to save the completed form. Is anyway that I can do that?! Or if it can't be done in this way, how can I make such large forms in AMS?!
    Here I have included my html forms.
    kartelat.zip

  • #2
    How can you make large forms like this..... many input boxes. It's going to be more the design. One possibility would be a master form with subsections, the master being a normal page, the subsections being in dialogs.
    How you save the data depends on the delivery platform you use.
    This shouldn't be beyond HTML5's capibilities if you want to use a purely html 'web' delivery. Then all you need to do is to package up the data and push it to storage, either a database or an XML file; it rather depends on what you are doing with it once the form is completed.
    If you use AMS then it should be based on the local machine although it is possible to open the app remotely. The only problem with using a single app instance that isn't on the local machine would be concurrency, two or more users trying to save the data at the same time could end up as being very messy

    Comment


    • #3
      Thank you for the reply Nickj
      The idea was here when I save the content of the page, AMS would copy the content of the .html file and
      theoretically it does it, but is lets the head content without being copied.
      Here is the code that I use to save the document:
      Code:
      		 result = MySQL.Query("INSERT IGNORE INTO pacientet_kartelat VALUES(NULL, '" .. IExplorer.GetDocumentBody("Plugin1") .. "');");
      		 if result == -1 then
      		               Dialog.Message("Gabim!", MySQL.GetError(), MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
      		          else
      		              Dialog.Message("Informacion", "Kartela u shtua me sukses në databazë!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
      		 end
      And to retrieve it I use this code:
      Code:
      resultset = MySQL.QueryToTable("SELECT pacientet_kartelat.shenime, pacientet_kartelat.kartela FROM pacientet_kartelat WHERE pacientet_kartelat.id = " .. kartela_id_buffer .. " LIMIT 0, 1;", false);
      if resultset then
          for i, row in pairs (resultset) do
                Input.SetText("shenime", row[1]);                
                TextFile.WriteFromString(_SourceFolder .. "\\kartelat\\temp.html", row[2], false);
                IExplorer.Navigate("Plugin1", _SourceFolder .. "\\kartelat\\temp.html");                
          end
      end
      The idea is how to get correctly the content of the filled form in the first script
      I have also thought to use pdf templates.
      Could this be done?! Can I get the content of document + the content of the filled forms on pdf object?!

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎