Forum Replies Created
- AuthorPosts
lawrencepepper
ParticipantOK,
Figured this out, just leave the value blank for the label “Choose” then select required.
Works.
Thanks
L
lawrencepepper
ParticipantYes,
Go to the advanced tab and add a Length validator. Put in a minimum of 1 and a max of 100.
L
lawrencepepper
ParticipantOk,
I figured this out, I amusing the digit validator along with the length validator to accomplish this.
Thanks again!
L
lawrencepepper
ParticipantThanks!
Another question, is it possible to do two regex validators.
I have a similar field that needs to be either 4 or 5 numbers.
So when they enter the number it needs to be either 4 numbers or five. That is all.
L
- This reply was modified 11 years, 6 months ago by
lawrencepepper.
lawrencepepper
ParticipantHello,
I used the second example from above:
By using the hook I was able to pass the form data, then use PHP/HTML to display it.
L
lawrencepepper
ParticipantOK got it!
used this:
<script>
jQuery(document).ready(function ($) {
$('.iphorm_1_1').change(function () {
$('input[name="iphorm_1_14"]').val($('option:selected',this).text());
}).change();
});
</script>Thanks so much for the help!
L
lawrencepepper
ParticipantSomehow I think this needs to be used so that we are setting the value to just the text label of what is chosen in the dropdown:
$('option:selected',this).text();
L
lawrencepepper
ParticipantHi,
Getting close. That script sets the hidden field to the value. I need the label.
When I change the script to:
<script>
jQuery(document).ready(function ($) {
$('.iphorm_1_1').change(function () {
$('input[name="iphorm_1_14"]').val($(this).text());
}).change();
});
</script>
It works but it inserts all the labels from the dropdown, not just the one selected.
Any ideas?
L
lawrencepepper
ParticipantTried this but still can not get to work.
<script type="text/javascript">
$(document).ready(
function() {
$('select[name=iphorm_1_1]').change(
function(){
var description = $('option:selected',this).text();}
);
}
);
</script>Thinking if I can get this script to work I can then insert a hidden field and have it’s default value be this variable. Then I can insert it into my database with the rest of the form data as I am doing now.
- This reply was modified 11 years, 6 months ago by
lawrencepepper.
lawrencepepper
ParticipantI found this that basically does what I am asking, can it be adopted to work here:
$(document).ready(
function() {
$('select[name=package]').change(
function(){
var newText = $('option:selected',this).text();
$('#costLabel').text('Total price: ' + newText);
}
);
}
);guessing:
$(document).ready(
function() {
$('select[name=iphorm1_1]').change(
function(){
var description = $('option:selected',this).text();}
);
}
);- This reply was modified 11 years, 6 months ago by
lawrencepepper.
- This reply was modified 11 years, 6 months ago by
lawrencepepper.
lawrencepepper
ParticipantIf possible, any help with the script would be appreciated.
Thanks!
- This reply was modified 11 years, 6 months ago by
lawrencepepper.
- This reply was modified 11 years, 6 months ago by
lawrencepepper.
lawrencepepper
ParticipantCan this be done with javascript?
Would it be possible to insert a HTML element into the form with a javascript that sets a variable based on what was selected in the dropdown?
So say they select Vacation. The javascript would then set a variable named descritpion that had the value of Vacation, which I could then use to pass with the form and insert into the database?
L
lawrencepepper
ParticipantOK,
Figured out how to do this using filter hooks.
L
lawrencepepper
ParticipantOK,
Figured this out, this has been happening for awhile we just never noticed since the update function of the app was not used often,
BUT
Anytime there is a quote mark (“) in a field it breaks the population of the fields.
We have a couple description fields where quote marks are being used for inches. i.e.: 1.5″ long and 4.5” wide.
How can I fix this so that text fields that have had quote marks put into them do not break the dynamic population? Guessing this has to do with the query to grab the data?
Any help would be appreciated.
Thanks!
lawrencepepper
ParticipantAlly,
Thanks! That worked.
Great idea!
L
- This reply was modified 11 years, 6 months ago by
- AuthorPosts