Skip to content

Instantly share code, notes, and snippets.

@nkgokul
Last active August 29, 2015 14:17
Show Gist options
  • Save nkgokul/bac35fbde279b0d864df to your computer and use it in GitHub Desktop.
Save nkgokul/bac35fbde279b0d864df to your computer and use it in GitHub Desktop.
Getting Field types and its keys from content creation page in Drupal 8
var options = '';
jQuery('.form-item-new-storage-type select option').each(function(){
options = options + (jQuery(this).text() + '<<' + jQuery(this).val() + '\n');
});
console.log(options);
/**
* Copy paste the output from console.log to Google Spreadsheet
* You can use =SPLIT(A1,"<<"); function to split the key value pairs.
* /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment