![]() ![]() You can create a module that implements a submit function. *Note: In Drupal 7, the core jQuery Library is referenced by "jQuery", not the "$" alias Despite the report in 259400, using multiple select (aka checkboxes), the db is storing the Readable, NOT the key value, and as a result, viewing the submission ends up with empty values for these checkboxes (since they don't match the keys it's looking for to populate the checkboxes correctly) Removing the Readable Value part of the select. The ".change()" call at the end is to trigger a change event so that your hidden field is always populated with the appropriate data.īe sure to put your code in a "jQuery( document ).ready(function() " call so that the bind is made at the right moment and so your page has finished loading. Some Javascript::jQuery for what you want: jQuery( "#my-select-field" ) Then, write some jQuery or JS to do what you want on the node that is housing your webform.ie:.Update your content type settings (ie. ![]() Code per Node - allows you to add custom CSS/JS to content types or individual nodes 'safekeySome readable option' seems to output the readable option regardless of using emailvalues, valuekey or emailkey.However, if you insist on having the select field change the hidden field's value and you want to do this purely through Drupal 7 front-end, then I suggest the following: If you like, since you want the value "First", you can even capitalize the keys, ie: First|This is some pizza So your select field options would have something like: first|This is some pizza I agree with Ben.you should use the value of the select fields themselves using the syntax for the select field Options, ie "safe_key|Some readable option" (without quotes) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |