Forum Discussion

JaimeFonseca's avatar
JaimeFonseca
Qrew Trainee
5 years ago

Button that opens an html form and adds the registered fields

I have a form in the customers table with a button (capture) that opens an HTML form with two fields that are (Name - Surname), I want my button (capture) to store that information in the customers table in the fields (text and text1 ) and the same in more fields that I add.

Currently this code

var text urlToExecute = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=cnbri4sbttfxsfys53ftbiz34vv"
& "&rid=" & [Record ID#]
& "&_fid_30=" & URLEncode([text])
& "&_fid_111=" & URLEncode([Text1])
;
URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=11"
& "&url=" & URLEncode($urlToExecute) // Pass in the URL to execute

Only a single record is saved, in this case if I put a name, it is saved in the Text1 field fid_111, the other field fid_30 is blank.

Also as I do, for it to work in adding record, it only works in editing record.

------------------------------
Jaime Fonseca
------------------------------
  • I notice that your button is located on your Customers table and the action you're taking is on the same table. Is there a reason you're using the HTML form to capture data rather than just directing the user to a different form on the table?

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quickbase Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------