I have a datapage submission form with a javacript button, a textfield and a Virtual field set as a calculated value . When the button is clicked it populates the textfield with, for example, "No Model Number". The calculated value field is supposed to register the populated field and create a value of 1. When I click the button, the field is populated but the calculation isn't done. If I enter the "No Model Number" manually it works fine. Is there some JS code I need to add to the button code and if so, can anyone please let me know. The button code I'm using is:-
<input type="button" value="Click here" onClick="copyNoMod()"/> if no Model Number
<script>
function copyNoMod(){
document.querySelector("[id='InsertRecordModel']").value = "No Model Number"
};
</script>
I've been looking at this and researching the forums and web but just can't find a solution so any help given is genuinely welcomed. Thanks in advance.
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
RonAnderson
I have a datapage submission form with a javacript button, a textfield and a Virtual field set as a calculated value . When the button is clicked it populates the textfield with, for example, "No Model Number". The calculated value field is supposed to register the populated field and create a value of 1. When I click the button, the field is populated but the calculation isn't done. If I enter the "No Model Number" manually it works fine. Is there some JS code I need to add to the button code and if so, can anyone please let me know. The button code I'm using is:-
<input type="button" value="Click here" onClick="copyNoMod()"/> if no Model Number
<script>
function copyNoMod(){
document.querySelector("[id='InsertRecordModel']").value = "No Model Number"
};
</script>
I've been looking at this and researching the forums and web but just can't find a solution so any help given is genuinely welcomed. Thanks in advance.
Link to comment
Share on other sites
1 answer 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.