I have a table with 3 fields:
ID (Autonumber and unique), FieldAA (Text 255) and FieldBB (Text 255).
My web form to update records shows Virtual1 getting its value as External Parameter [@Param1], then FieldAA as Text Field, FieldBB and ID as Display Only. I wish to set FieldAA with the value of Virtual1 when submit pressed.
<SCRIPTLANGUAGE="JavaScript">function concatenate(){var x = document.getElementsByName('cbParamVirtual1').value;
document.getElementById('EditRecordFieldAA').value = x;}
document.getElementById('caspioform').onsubmit=concatenate;</script>
Using the web form I get correctly both values of FieldAA and FieldBB and Virtual1 shows the parameter value I passed, but when I click submit FieldAA or edited records remains unchanged.
Where I am lost? Inspecting page all seems correct but my feeling is that my concatenate function is never triggered. I tryed also to add a console.log("I was here...") just before the end of the function and nothing appear on console. I am doing my first app and I am shure that my newbie status make me blind to something, do you have any hints?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
vidierre
I have a table with 3 fields:
ID (Autonumber and unique), FieldAA (Text 255) and FieldBB (Text 255).
My web form to update records shows Virtual1 getting its value as External Parameter [@Param1], then FieldAA as Text Field, FieldBB and ID as Display Only. I wish to set FieldAA with the value of Virtual1 when submit pressed.
So looking into this post https://forums.caspio.com/topic/4983-passing-data-from-a-virtual-field-to-a-non-virtual-field/ I added at bottom an html block, disabled HTML editor and added this code
Using the web form I get correctly both values of FieldAA and FieldBB and Virtual1 shows the parameter value I passed, but when I click submit FieldAA or edited records remains unchanged.
Where I am lost? Inspecting page all seems correct but my feeling is that my concatenate function is never triggered. I tryed also to add a console.log("I was here...") just before the end of the function and nothing appear on console. I am doing my first app and I am shure that my newbie status make me blind to something, do you have any hints?
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.