It appears this module is the only D7 module that can insert book metadata by a "shortcode" ([] or {}) since the Book Post module, which does similar, doesn't seem to have a D7 release.

I have a custom CCK form which uses the Select (or Other) module to add an "other" conditional field in a radio list. In my use case, the "other" field is for a book ISBN. As of now, it appears that any ISBN entered is just displayed statically. I'd prefer if it could dyamically insert matching book data, as this module does, based on the ISBN input from the "other" field.

Is this possible? If so, would you consider making it compatible with the Select (or other) module?

Thanks

Comments

darrell_ulm’s picture

Hi, your interest is appreciated.

Your ideas sound interesting and if anyone gives me working code I'll incorporate it.

Sorry that lately have not had time to put towards contrib modules if they aren't related to specific projects.

Stomper’s picture

As an FYI, I've created a similar issue on the Select (or Other) module issue queue here for those interested: https://drupal.org/node/2111933

Stomper’s picture

Here's a response from the mirror thread - https://drupal.org/node/2111933

"It looks like the Google Books module uses input filters to accomplish the book searching. This module uses single line text fields for its input and cannot use input filters. Input filters work on multi-line form elements. Sorry these two modules are not compatible with each other."

Could a future version of this module adopt a technique that would make it compatible or is there a workaround?

Stomper’s picture

Otherwise, would a field used in conjunction with Conditional Fields work as an input for shortcodes?

It seems I could build my "other" option radio list using Conditional Fields, and would be willing to, if Google Books can work with it as an input.

darrell_ulm’s picture

I'm guessing any field that can have an input filter associated with the field should work and I believe this will work for single line text fields w/ some configuration, but not sure if it can work with https://drupal.org/project/select_or_other.

As a test I made a new content type with one field after removing body which is unlimited 'single' lines of text, not a textarea.
http://superpowerplanet.com/content/google-books-field-test
As long as the text field is set to whatever input-filter has Google-Books enabled and setup. The fields embedded in [google_books: ... ] appear fine, but I'm not using select_or_other.

If the ISBN could be built up into the google books tag format like '[google_books:' . $your_ISBN . ']' in a field with the right input format, then, in theory it should work. Could you use https://drupal.org/project/computed_field to do this? (see: https://drupal.org/node/149225)

Just some ideas.

Stomper’s picture

Thanks for your help. I'm happy to use computed fields to achieve this functionality, if computed fields will work with the "other field" functionality offered by Conditional Fields or Select (or Other). I'm not sure if Select (or Other) can work with computed fields, but that is a separate issue.

Based on your description, it appears a user will need to add "[]" around the ISBN within the field. Can this be automated on the backend or done with validation? I'm not familiar with Computed Field, but if it is necessary to have the "[]," it'd be useful if that module could do that on node submission - user enters ISBN into field, clicks submit, before publishing the "[]" are added around the ISBN etc.

darrell_ulm’s picture

I cannot be sure, as I've not tried the module in every possible situation, Drupal is after all very flexible. The only way to know is for someone to try it and see what works.

Good luck.

darrell_ulm’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)