This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //form behaviors | |
| $('form .form-submit').click(function(e){ | |
| $('input.required').each(function(){ | |
| if($(this).val()==''){ | |
| $(this).focus(); | |
| e.preventDefault() | |
| return false; | |
| } | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Create wrapper around the node. | |
| $wrapper = entity_metadata_wrapper('node', $node); | |
| // We can do it also using only $nid. | |
| $wrapper = entity_metadata_wrapper('node', $nid); | |
| // Get the value of field_name of the nodes author's profile. | |
| $wrapper->author->profile->field_name->value(); | |
| $wrapper->author->profile->field_name->set('New name'); |
NewerOlder