Forum Discussion
GauravSharma3
9 years agoQrew Commander
Hi Jason,
Please have a look at the Dan solution.
https://community.quickbase.com/quickbase/topics/i-would-like-to-grab-numbers-from-a-text-field-and-...
It will useful for you.
Thanks,
Gaurav
Please have a look at the Dan solution.
https://community.quickbase.com/quickbase/topics/i-would-like-to-grab-numbers-from-a-text-field-and-...
It will useful for you.
Thanks,
Gaurav
JasonJohnson
8 years agoQrew Assistant Captain
Here is the code we tested and it is yours so maybe I made a mistake somewhere
(function(){
var querystring=document.location.search;
if(/a=er/i.test(querystring)) {
//EDIT RECORD PAGE ========================================
alert("You are on the Edit Record Page");
$("#_fid_50").attr("readonly", true);
$("#_fid_17").on("blur, change, keyup", function() {
var field = $("#_fid_17").val();
var terms = field.split(/\D+/g);
var product = _.reduce(terms, function(memo, item,index) {
return item.length > 0 ? item * memo: memo;
}, 1);
$("#_fid_50").val(product);
});
}
})();
(function(){
var querystring=document.location.search;
if(/a=er/i.test(querystring)) {
//EDIT RECORD PAGE ========================================
alert("You are on the Edit Record Page");
$("#_fid_50").attr("readonly", true);
$("#_fid_17").on("blur, change, keyup", function() {
var field = $("#_fid_17").val();
var terms = field.split(/\D+/g);
var product = _.reduce(terms, function(memo, item,index) {
return item.length > 0 ? item * memo: memo;
}, 1);
$("#_fid_50").val(product);
});
}
})();