Business Directory: Making the "Add a Business Listing" Form work

By: Ralph Nohe | Asked: 08/18/2024
ForumsCategory: How-toBusiness Directory: Making the "Add a Business Listing" Form work
Ralph Nohe asked 2 months ago
Dear Formidable Forms community, I am pretty new to FF and am trying to make the Form "Add a Business Listing" work. This form is part of the Business Directory application. Now where I am struggling is the following: The form contains a step "Account" with several mandatory fields, e.g. Password. How can I skip this entire step (account page) for already logged in users?  Note/what I already tried: I added a hidden field that pulls the user's wordpress email address. Then I added a conditional logic "skip next page IF email contains @", i.e. skip if email is know AKA user is logged in. The account creation step is then hidden as intended. However what happens then is after form submission there's an error because the Password (and other fields) of the account form page are mandatory (which makes sense of the user is not registered yet). Also, all the above does not take into account that the user could already have registered before, and would just need to be shown a LOGIN form instead of the registration form then. How can I solve the topic outlined above? Thank you for any help. Best regards, Ralph
4 Answers
Rob LeVineRob LeVine answered 2 months ago
Honestly I'm not familiar with the Business Direction, however, that never stopped me from talking :). One idea for ignoring the required fields is to use frm_validate_field_entry to un-require the fields in your situation. However, that would save no data for those fields you're ignoring. If that's a problem you could use frm_setup_new_fields_vars to fill in the form with data from logged in user when the form is displayed. As for the second part (?) of your question about login vs. registration, I don't follow.
Ralph Nohe answered 2 months ago
Hi Rob, Thanks for your suggestion, I think this will be helpful! Will try it out tomorrow. Regarding the login question: Let’s assume a user already has an account on the website, is currently logged out, and starts filling the listing form. He fills out the first page, let’s say this page contains a listing title and the listing content etc. Then he clicks „next“ and comes to the account page. Registering him anew doesn’t make any sense. So I want him to be able to login using his existing credentials. After the successful login, the user would continue the form and be able to proceed to further form pages like payment and summary before he sees a „submit post“ button. Does that make sense? I am looking forward to hearing from you. Best regards, Ralph  
Rob LeVineRob LeVine answered 2 months ago
Again, I'm not familiar with the Business Directory, nor do I have the elite package so I can't get access to it. I don't understand why one would have a form to create a listing that had a login or registration form embedded into it. I would have something like a button "Create Listing" and when they click on it, it either senses that they're logged in or asks them to log in. On the login page, there'd be a section to create an account if they don't have one. Then they'd redirect to the create listing page. Alternatively, the create listing page would not even be available if the user weren't logged in and then they'd have to either login or register (and login) to see the page in the first. Like I said though, I'm shooting in the dark here.
Ralph Nohe answered 2 months ago

Thanks Rob, well yes, the premade directory form has the account (ie registration) page embedded in it after the post content is being filled in. This actually makes a lot of sense because the user isn’t held back from creating a listing by a registration form. My point was now mainly that then a login option would be nice. Anyway, thanks for your kind feedback. BR Ralph

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right