Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Webforms Administration
#6
I gave it a try and eneded up with this code:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>jstest</title>
        <script type="text/javascript" src="include/jquery/jquery-1.6.2.min.js"></script>
    </head>

    <body>
<form id='inform' name="inform">
    <input name="label;course[]" />
    <input name="label;course[]" />
    <input type="submit">
</form>
<input name="label:course[]" />
<input name="label:course[]" />
<script type="text/javascript">
$( document ).ready(function() {
    jQuery.each($("#inform :input"),function(index, elem) {
        if (elem.name=='label;course[]') {
            $(elem).val(index);
        }
    });
    jQuery.each($("input[name='label:course[]']"),function(index, elem) {
        $(elem).val(index);
    });
});
</script>
    </body>
</html>

Drop that into the root of your coreBOS install and it should work. Note how I have to change the colon for semi-colon in the name. Very strange.

My recommendation would be to use the field name: webforms should work correctly both with the "label:{label}" syntax and the "{fieldname}" syntax. So, if label:course is cf_888, both of these will work:

Code:
<input name="label:course[]" />
<input name="cf_888[]" />

that means that if you don't need to do anything with the form, the "label:{label}" syntax is fine, but if you need to do validations and the like, you may be better off using the fieldname.
Joe
TSolucio
Reply


Messages In This Thread
Webforms Administration - anilp78 - 01-14-2015, 10:46 AM
Re: Webforms Administration - joebordes - 01-14-2015, 03:09 PM
Re: Webforms Administration - anilp78 - 01-15-2015, 06:08 PM
Re: Webforms Administration - joebordes - 01-15-2015, 06:14 PM
Re: Webforms Administration - anilp78 - 01-25-2015, 08:34 AM
Re: Webforms Administration - joebordes - 01-25-2015, 07:41 PM
Re: Webforms Administration - anilp78 - 01-26-2015, 06:01 AM
Re: Webforms Administration - joebordes - 01-26-2015, 09:20 AM

Forum Jump:


Users browsing this thread: 7 Guest(s)