Page 2 of 3
Re: CP form: dynamic subject possible?
Posted: Fri 18. Jan 2008, 22:06
by Jensensen
[x]
Re: CP form: dynamic subject possible?
Posted: Fri 18. Jan 2008, 22:20
by juergen
claus wrote: And if I don't have a field like this - it is still working as per default:!:
Thats why this->me told you to use a seperated script

Re: CP form: dynamic subject possible?
Posted: Fri 18. Jan 2008, 22:54
by Jensensen
[x]
Re: CP form: dynamic subject possible?
Posted: Fri 18. Jan 2008, 23:02
by update
I hope that a feature (as little as powerful) like this will make it's way into the main distribution some day

.
Thanks again to you both, Jürgen and Jensensen, for discussing this and getting it to work

@Jensensen: I did it with a hidden field because radios simply don't show up within the subject select box (at least not for me), so I thought i would be a nice idea to get it working and tried the hidden field
EDIT: Too late
Will try your suggestion, Jensensen - but by now can't see the difference: using the MyEmailSubject for the radios when there is no pull down menu should work identically, or not? Hmmm....
Re: CP form: dynamic subject possible?
Posted: Fri 18. Jan 2008, 23:13
by Jensensen
[x]
Re: CP form: dynamic subject possible?
Posted: Fri 18. Jan 2008, 23:28
by update
Does the radio button show up in a standard form (without custom template) within thesubject select box? This form I did just plain standard, perhaps I've misunderstood you (you were probably talking about a form with a template?) In this case I didn't use a template, just a plain standard form...
Re: CP form: dynamic subject possible?
Posted: Fri 18. Jan 2008, 23:45
by Jensensen
[x]
Re: CP form: dynamic subject possible?
Posted: Fri 18. Jan 2008, 23:53
by update
but all checkboxes, radios, labels.... are always there [coded]
Yes, they are there - within the code. But I mean the field at top of the form generator where you can select which field should serve as a subject field. And this seems to be unable to handle radios (the option radios as subject doesn't show up)
Thus your code addition plus the hidden field --> then it shows up (in this box)

Re: CP form: dynamic subject possible?
Posted: Sat 19. Jan 2008, 00:23
by Jensensen
My suggestion:
[x]
Re: CP form: dynamic subject possible?
Posted: Sat 19. Jan 2008, 01:47
by Jensensen
[x]
Re: CP form: dynamic subject possible?
Posted: Sat 19. Jan 2008, 15:33
by update
[claus and forms - a story by itself]...
I'm German you know
And almost all Germans really are fallen in love with forms (they use to be born with some in hand to fill them in as soon as possible - well at first their parents do that for them, a lot of forms, really

)
But thank you for diving into this so deeply!
Things are becoming quite clear now, and the little addition for the core code should be implemented (somehow, by OG, perhaps...

)
So what do I have now:
- a changed source code
the possibility to get a custom subject line either via a select box or a radio set by using the var
the default possibility
This is really very great - perhaps it helps some others too (shouldn't be my private joy only

)
Many thanks again

Re: CP form: dynamic subject possible?
Posted: Sun 20. Jan 2008, 23:26
by Oliver Georgi
Yes, dynamic subject is possible by default!
Sorry again - think twice before "hacking" the core code for functionality still available using built-in functions.
To get a subject based on submitters input you can choose a field inside the content part. This is part one.
To get a processed subject based on input you can use a hidden field with some replacement tag in combination with frontend_render.
Or inject the $_POST var using frontend_init.
I have checked, yes seems there is a bug for select menus.
But stop hacking!!!
Re: CP form: dynamic subject possible?
Posted: Mon 21. Jan 2008, 00:30
by update
I have checked, yes seems there is a bug for select menus.
And radios, checkboxes too - eventually?
So this will be fixed! Good news
But stop hacking!!!
Then promised...

Re: CP form: dynamic subject possible?
Posted: Mon 21. Jan 2008, 16:57
by silbro
Hello!
I'm new to the script and new to the forum

I just noticed that phpwcms is quiet uhm how should I say wide ( You can do a lot of things with it ) My problem is that I want the user to be able to select the e-mail address he wants to send the form to. I guess this falls into the same category. After reading the first few lines of code I started drifting off in my dream world

, must be the time

(soon I can go home

) I understand what you guys did more or less just not in the detail (haven't looked at your code thoroughly enough). My question though is the following:
Wouldn't it be easier creating a form for special needs extern and then import it ? As far as I know it should be possible to import .php files without a problem, am I right

I just think it might not be the best idea to go hack in the original code because of overview and export reasons that might occurr later on.
Looks like I'll be using this forum more too in the future because the company I work at uses this script and since I got a bit of webpage creation experience they'll let me do more stuff with this script

Re: CP form: dynamic subject possible?
Posted: Mon 21. Jan 2008, 17:04
by Oliver Georgi
There are multiple ways to select the email address the form should be sent to. So this is really possible by default, including multiple recipients, send to friend or whatever.
Oliver