link forms by province

presupuesto

New Member
Good afternoon, please I need to link a form sent by any user from the front end and have it reach a company user registered in their private area.The difficulty I see is that I do not know how to link the provinces, that is, if the user requests a price for a bathroom renovation in Madrid, this form must be sent to all the renovation companies that have registered in Madrid.thank you so much.









Fabrik​


Fabrik

Hi, thanks for contacting us. We've received your message and appreciate you reaching out.
 
As it is not quite clear, what you already know about Fabrik, some general thoughts:
You should have a company list with at least province and e-mail.
In your form you should have a dropdown field, where the user selects the province.
In the email-form-plugin you do some eval (php):
database query to get all e-mail-adresses from company list, where the province is the same like the one entered in the form.
 
Struggling a bit with the wording 'private area'. Does this mean you have a company directory (fabrik list), where companies can register themselves and state their province and profession? Are province and profession pre-defined values?
Sometimes screenshots may be helpful...
 
thanks for your help.I try to explain it step by step.
Registration Page:Registration Form: User enters personal data and type of service offered.Province Selection: User chooses the province where they offer their services.

Froend Quote Request Page:Application Form: User enters job details.Province Selection: User chooses the province where the service is needed

Filter by Profession and Province: The system sends the request only to registered users who match the service and the specified province.Sending to

Private Area: The request is sent to the private area of the corresponding users.User

Private Area:Receiving Requests: Users see requests related to their service and province.
 
Registration Page:Registration Form: User enters personal data and type of service offered.Province Selection: User chooses the province where they offer their services.
Company List: This seems to be registration form for companies. 'Type of Service' and 'Province' should be pre-defined values (e.g. dropdown elements).
Edit: also the UserID of the registered company should be included as a field for the pre-filters to work.
Froend Quote Request Page:Application Form: User enters job details.Province Selection: User chooses the province where the service is needed
Request List: Do requestors need to be registered? If not, they can not see their requests afterwards. Beside the pre-defined selection elements ('Type of Service' and 'Province') and a detailed job description, contact information should be collected, so companies can give a quote.
Filter by Profession and Province: The system sends the request only to registered users who match the service and the specified province.Sending to
This is something which can be realized with pre-filters. Logged in companies can only see in the Request List requests matching their 'Type of Service' and 'Province'. (see here: https://fabrikar.com/forums/index.php?wiki/list-pre-filters/ ). So this something, what you would call 'Private Area'
 
Last edited:
Company List: This seems to be registration form for companies. 'Type of Service' and 'Province' should be pre-defined values (e.g. dropdown elements).
Edit: also the UserID of the registered company should be included as a field for the pre-filters to work.

Request List: Do requestors need to be registered? If not, they can not see their requests afterwards. Beside the pre-defined selection elements ('Type of Service' and 'Province') and a detailed job description, contact information should be collected, so companies can give a quote.

This is something which can be realized with pre-filters. Logged in companies can only see in the Request List requests matching their 'Type of Service' and 'Province'. (see here: https://fabrikar.com/forums/index.php?wiki/list-pre-filters/ ). So this something, what you would call 'Private Area'
Company List: This seems to be registration form for companies. 'Type of Service' and 'Province' should be pre-defined values (e.g. dropdown elements).
Edit: also the UserID of the registered company should be included as a field for the pre-filters to work.

Request List: Do requestors need to be registered? If not, they can not see their requests afterwards. Beside the pre-defined selection elements ('Type of Service' and 'Province') and a detailed job description, contact information should be collected, so companies can give a quote.

This is something which can be realized with pre-filters. Logged in companies can only see in the Request List requests matching their 'Type of Service' and 'Province'. (see here: https://fabrikar.com/forums/index.php?wiki/list-pre-filters/ ). So this something, what you would call 'Private Area'
thanks for your help.
 
good morning,In principle, having already taken the first step, I have manually created a registered company in the backend with the Fabrick registration form. In the pre-filtering of the list I have done it with the province field and the value of the province with which I want to filter. As I said, this is the first step, but I find myself blocked, because if I put the rest of the provinces, within the same value field, it lists them all for the same user. I have tried to try other fields and conditions but it is not possible.I also couldn't achieve it with the id "{$my- >id}", I have followed the forum manual, but I can't do it correctly.
 
Give me a little bit of time. Probably I need to re-think and do some tests. Not sure, if I find the time today...
 
Just did a quick test.
I created one list 'company' with dropdown-fields 'profession' and 'province'. In addition I created a user-field (called 'companyid').
The second list 'request' had just two fields (profession, province). Same type (dropdown) and content like in the company list.
I added two pre-filters (eval!) in the request list and it seems to work. But I didn't do an extensive test (that's up to you :) )
1712345837450.png
 
T
List request width con prefilter.png
hanks for your help. It seems like I'm doing something wrong but I can't find the error. I follow your steps,
then I create a form type fabrik menu to make the order request and I create a fabrik menu with the ready option to show the lists and I get the following error
error in front-end.png
 

Attachments

  • element form company.png
    element form company.png
    45.2 KB · Views: 40
  • pre-filter lister company.png
    pre-filter lister company.png
    18.1 KB · Views: 32
  • element form request.png
    element form request.png
    45.3 KB · Views: 36
Your first screenshot shows this code in the first line: $company=$my-id};
Try $company={$my-id};
Probably you missed the opening curly bracket :)
 
good afternoon and thank you very much for your response. I still have the same problems, the code you tell me only works by selecting Guest in "apply to", in any other option I get the same error of "0 syntax error, unexpected token "{"". The list does not filter me by province and profession either. It must be taken into account that the company user registers alone and the request must reach their user panel.thank you so much.
 
thanks but it doesn't work. It does not filter by province or by profession, it does not matter what you select, everything reaches the list, when it should only reach registered users with that profession and province.
no filter.png
configuracion.png
 
Code:
$company='{$my->id}';
$db = \Joomla\CMS\Factory::getContainer()->get('DatabaseDriver');
$query = $db->getQuery(true);
$query->select('profession');
$query ->from('company');
$query -> where('companyid =' . $company)  ;
$db->setQuery($query);
$result = $db->loadResult();
return $result;
 

Members online

No members online now.
Back
Top