Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author John Huebner

    (@hube2)

    Right now I’m just returning the selected value as sent in $_POST.

    Can you post a link to documentation for this on standard select fields in CF7 and I’ll dig through it and the CF7 code to see what I can do.

    In the mean time you can set the label and value to the same value in your filter. That was my thinking when I created the plugin so that it could be as simple a possible and let the filter make all of the decisions.

    Thread Starter zigsp8

    (@zigsp8)

    Yes, I’m sure in MOST situations that you could/would have the value & text to be the same, but unfortunately, not this particular one.

    I need the “value” which is a “nicename” to as an arg to another call, but I’d like the label, which is a more people friendly name, to show in the email, if possible.

    link to using select value / text in email: http://contactform7.com/selectable-recipient-with-pipes/

    Plugin Author John Huebner

    (@hube2)

    Thanks for the info, I will add this to my to-do list over on the github repo https://github.com/Hube2/contact-form-7-dynamic-select-extension. Going to have to dig through the code and see when I have some time.

    Thread Starter zigsp8

    (@zigsp8)

    Ok. Thanks for looking into it.

    Love the plugin by the way. Made my job SO much easier.

    Plugin Author John Huebner

    (@hube2)

    I have been looking into this and I can’t seem to figure out how to incorporate pipes and _raw_ into this plugin. The problem here is that the values of the select field do not actually appear in the cf7 tag to cause it do the processing that would normally be done in when pipes are included the select values.

    I would welcome input on this if there is someone that thinks they can modify this plugin to add this feature. I have this plugin on github https://github.com/Hube2/contact-form-7-dynamic-select-extension, along with my other plugins. I will accept pull requests and give credit to other developers for any contributions. My only request is that the plugin stays focused on dynamic select fields and does not expand into other types of fields.

    Was there ever a resolution to this issue? I am in the same boat, have user IDs as the value and user names as the label, so need to return the label in mail instead of the ID.

    Thanks in advance!

    Plugin Author John Huebner

    (@hube2)

    No, there is no resolution to this issue.

    When I created this plugin, the reason I created it and the use I created for was in order to do something else based on the value selected. Specifically, to send the email to different recipients based on the value selected.

    If my purpose for this field was only to insert the selected values into an email then I would set the values and labels returned by my filter so that the value and label were the same or the value was what I wanted to insert into an email.

    I’m not sure what I’d do in the case where I needed both the value and the label.

    I understand that there may be other ways that an add on like this could be used. I have looked into adding this, but I do not have enough knowledge of CF7 to figure out what I need to change and I don’t have a need for it. I don’t have a lot of time for working on things that I don’t need.

    To be honest, if I new what CF7 hook to add a filter to in order to return the label instead of the value when CF7 is adding the value to the email it would probably be simple, but I’ve dug around in CF7 and can’t seem to work out where this happens and I don’t have the time to continue digging.

    If there is anyone out there that has the need for this add on to do more than it does and also has the time and knowledge to do so I have this plugin set up on GitHub and would gladly accept pull requests from people that want to improve it, as long as they plan on sticking around to help correct any issues that may come up with those improvements.

    When I create a plugin it is because I have a need for the functionality that it provides and because I can’t find something that already does what I need to do. If I think that it might be useful to others in the community then I make them public. It’s not that I don’t want to improve them, it simply that I don’t have the time to spend on making improvements that don’t have a personal need for.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Label instead of value in mail’ is closed to new replies.