Problem/Motivation

I have created an entityform with a couple of Fields API fields. One is a text field & the other is a field from the Barcode module. I am trying to pass values from the text field (field-textual) to the Barcode field on submit using tokens, & on the results page generate the bar code from the token from the text field ([entityform:field-textual]). However, on the results page the token has not been passed for the text field, but tokens for, e.g., [current-date:short] & [site:name], have been passed & are encoded in the bar code. I must be missing something.

Do I need to make a multipart form that gets & stores the value of the text field on first submit, then passes the value via token to the Barcode field on final submit?

Comments

tedbow’s picture

Not exactly where you are inserting your code.

Are you using the #submit form property?

Where exactly are you entering the tokens? I have never used the barcode module.

Thanks

tedbow’s picture

Priority: Normal » Minor
Status: Active » Postponed (maintainer needs more info)

Really need more info

Anonymous’s picture

Hi,

The tokens are just written out in the barcode widget (a text area). I've placed several tokens as default values in the barcode field using the 'PLACEHOLDER TOKENS' click insertion feature when I create/edit the barcode field in the entityform type I've created.

The Barcode module adds a Fields API field that can be added to entities/custom types, available in the entityform 'entityform type' creation UI (manage field > add barcode field). So I've added a text field & the Barcode field to an entityform type I have created. Then I add the tokens for the text field in the form to the Barcode field. When I submit the entityform (set to Show Submission Information) the barcode module will generate a barcode for system-wide tokens like site name & current date, but not for tokens for the text field that gets user-entered data in the entityform.

I hope this makes sense. Thanks for your response.

tedbow’s picture

rhclayto,
I am not really sure. I don't have to time to try out the Barcode module right. Have you tried it with other entities? For instance have you tried out the same situation on Node content type? If not maybe try it out there first.

Thanks

Anonymous’s picture

Created a custom content type node creation form. Added text field & barcode field. Barcode set by default to contain a token for the text field. On node creation, the node is displayed & the barcode has been generated using the text-field token.

It would be cool somehow to do something like this in entityform, so when the entityform front-end form is submitted the barcode is generated & then displayed on the results page.

Hope this helps. Thanks for having taken the time on this.

tedbow’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Found that Barcode is hardcoded to handle only nodes and not other entities.

I created this #1434178: Make Barcodde work with other Entities besides Nodes. There is patch that you could try. Please respond to that issue not this one since I don't think it is issue with Entityforms.

One thing you could do to be sure that I am right that Barcode doesn't handle other entity types besides nodes is to try to do what you did in #5 but with field attached to the user object.

Thanks

Anonymous’s picture

Thanks for your efforts. I've responded in the Barcode issue.

PS: Barcode attached to user field didn't work getting tokens for user input text fields, so must be hard coded to nodes as you suggest.