Home Forums General Issues Public form creation


Public form creation

  • Hello,
    I’m new with Acf and need your help to create a public form.
    Let me clearly explain my problem.

    I already create a Field group named “compagnie” with 3 fields type :
    Name (type text),
    Hour (type number),
    Url (type URL)
    and use it to create some compagnies.

    The public form i want to create is composed with 2 inputs. 1 select and 1 date and hour.

    My first problem:
    I want to show all the “compagnie title” in a select field on my form.
    I tried to follow this tutorial, but all i have tried doesn’t work. So i’m not sure about how to put the function.php. Is it in the template or in my theme function.php.
    The category number is 60.

    The last problem :
    The next step will be to do a calculation invisible for user. This calculation will be (selected_compagnie_number + date_and_hour). Depending the result, i will redirect user.

    Any help will be appreciated.

  • Hi @91fidji

    Do you want to save any data from the form? If you don’t need to save any data to your database, then you don’t need to use acf_form() at all.

    You can create the select box by using the HTML select tag and set the options from the returned names (unfortunately, I’m not sure how you get names).

    To redirect the user, please check wp_redirect() function.

    I hope this makes sense 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Public form creation’ is closed to new replies.