I'm new on seblod but I think it can do amazing think so I've started to understand how it works.
Just now I would need to create in my joomla website 2 forms.
One of them has to be filled in from new members and it will contains several fields, like city, name etc.
The second will be used from client to send a request to the members.
My question is, is it possible to set the second form in a way that it will be able to send the request mail from the clients only to the members who are on the city selected by the client?
Here an example to clarify my needs:
the are 3 members from Rome and 1 from Milan that registered with the first form. A client fill in the second form and in the field of the city select Rome.
What I need is that this second form will be sent automatically, when the client click on submit, only to the 3 members from Rome and not to the one from Milan.
I got how to use the joomla registration and add the fields that I need so the first form it' ok, but I cannot find a way to create the second form and make it send the mails based on the selected city. I'm not a programmer so I cannot use php or other languages besides than html and css.
I'll appreciate if anyone will take some time to help me in this matter
to use JS. In hidden position you can render a list module with all your users - you need user_city and user_email fields. After client chooses his city your JS trigger copies all user_email fields values to special textarea. You just put this textarea field to FROM setting of your EMAIL field. Minuse of this method - bid list of users in html
To use core42 field. Before Store you have a filled sity - so you can made request of all emails from this city and put the result to $_POST array to the value of special textarea which is source for FROM setting of your EMAIL field.
I didn't try these methods, but you can try and report us about result.
Thank you guys for your hint... but if is not to much...could you be more specific in how I can get this done? ...it's my bad... I know...but I still can't code JS, SQL or PHP...I've just started studing and on the SEBLOD manuals and tutorials I couldn't find a solution
@Ilya: I spent the day trying to figure it out how to put what you suggest in practice... ,
I went to research the core42 field but I'm still stuck.
I suppose I should put the code on the "PrepareForm" area but what code should I put?
I was thinking in something like (please dont' laugh) ;)
SELECT users.email FROM users JOIN cck_store_item_users ON users.id = cck_store_item_users.id WHERE ccK_store_item_users.city = ?
but I don't get how to put the WHEREclause to get the filed city set in the form and how to put the results in a textarea field
If you have some time, do you mind help me a little more and be more specific?
@ricco : Infact I make the city the "main key" to decide how to send the requests from the client so it's for sure mandatory. My problem, in fact, is how to create that query.
Core42 field has three textarea for queries. You need Before Store section and you can type php code directly to this textarea. Your query will be applied before data stories.
So I see follwing algorithm:
You have an Email filed to send email, select field for city choosing, Core42 field to select emails and fill Email field by these emails and other field which you need.
User fills a city field and other neccessary fields and submits mail form
Before story Core42 field applies a code which select all emails of site users from selected cityand fill Email field by these emails. You can take selected city as $_POST['cityfield_name'] and Email filed as $_POST['emailfield_name'] -all your filed values are in $_POST array.
Form values save and Email filed sends emails to your users.
@Ilya/@Bucklash: the algorithm aswers exacly my needs, bu I still can find the code to put in the code42 field to select the email from the DB and to put them in the emails field. I' still going triugh the documentation and video that I've found also on youtube, but they didn't help till now...
I know I'm asking a lot...but... can anyone put down some code for me.
Do you you use it exclusively for certain things like code42 instead of beforRender etc.
I haven't found it tet but I seem to remember reading something that suggested code42 shouldn't be user for certain things as it effected search result capability etc... (though that could have been a really pointless dream..... )
I try to use free fields and Core42 is very useful for different things, but it hasn't After Store section for example, and I can't use it for this. So, in my opinion it's developer's field - it's more than simple construction - you should be coder to use it.
@kief - you won't create any sites without simplest PHP and MySQL skills, sorry..
Thanks so much for this application! However, I've had to temporarily remove it as you included the Select Dynamic Cascade field within your package, which is a premium product for sale on SEBLOD.com. Distributing paid plugins in that way is a breach of our Terms and Conditions (although I'm sure you didn't do this knowingly).
Can I ask that you please remove this field from your package before sharing it again? Otherwise, please contact us about getting your own vendor store established on SEBLOD.com where we can work out an arrangement for the distribution of this plugin within your app package.
@Ilya: thanks for the code and for the help, I will try it in the next days
@Bucklash: unfortunately I couldn't get the app. Hope to have the possibility to see it soon because from your description it seems that it will help me a lot also to better understand how seblod works.
@_jirmo: just to know, if I buy the "Select Dynamic Cascade" field could you send me also the Bucklash app (obviously only if Bucklash agree with this)?
I'm studying your App and I cannot figure it out how did you manage to put the emails you selected with the Select Dynamic Cascade into the 'Users Email Address' field and how did you have them separated by comma.
thanks to your app, yesterday I've finally manage to solve my question, I've just changed the query to make them easier (at least for me ;) ).
So I've really appreciate your help.
Now I bump my head on other new bigger problem.
I'll need that in the mail there should be a link (that expires in 48h) to a new form that should contains, in the first part, the client's requests and in the lower part a form that can be filled in with the answer and a botton to save them in the system. After the 48h the answers provided from the different users should be automatically compared and only the one with the better price should be sent to the client.
I don't expect to have the solution like you did before but if you have any ideas if this can be done it will already be a big help.
Answering these kind of posts help me learn (Ilya's answer was insightful for me), but I'm not sure how to solve this one, sorry.
Getting data evaluated after a set period of time ... would that be some kind of CRON job?
I reckon you can have the client submit the client form, have a new cintent type created dynamically with the publish date 48hrs from now. When it publishes, have the relevant data pulled from the user forms, do the evaluation and submit.
I won't have time to do anything as am too busy at minute, but would like to see someones proposal....