mpower Posted December 19, 2006 Share Posted December 19, 2006 Is there anyway to get the value from a text field to a hidden field before you submit a form?Thanks in advance Link to comment https://forums.phpfreaks.com/topic/31226-solved-text-field-to-hidden-field-onchange/ Share on other sites More sharing options...
fenway Posted December 19, 2006 Share Posted December 19, 2006 Get the value to where? And it would be onblur... Link to comment https://forums.phpfreaks.com/topic/31226-solved-text-field-to-hidden-field-onchange/#findComment-144587 Share on other sites More sharing options...
mpower Posted December 20, 2006 Author Share Posted December 20, 2006 This is what I was thinking about:[code]<input type="text" name="group_" size="15" value="" onChange="this.form.group.value=this.value;"><input type="text" name="group" size="15" value="">[/code]So it's not onBlur at all. Link to comment https://forums.phpfreaks.com/topic/31226-solved-text-field-to-hidden-field-onchange/#findComment-144969 Share on other sites More sharing options...
artacus Posted December 20, 2006 Share Posted December 20, 2006 Well you could use an onSubmit on the form element. Does this work? I'd probably move that to a function and call the function must for maintainability sake, but if it works, it works. And the only difference between onChange and onBlur here is that onBlur would fire whether the field was changed or not. Link to comment https://forums.phpfreaks.com/topic/31226-solved-text-field-to-hidden-field-onchange/#findComment-144975 Share on other sites More sharing options...
fenway Posted December 20, 2006 Share Posted December 20, 2006 No kidding... never used onchange for anything that checkboxes. Link to comment https://forums.phpfreaks.com/topic/31226-solved-text-field-to-hidden-field-onchange/#findComment-145296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.