1

I have a form that has 2 stages each stage creates a new entry Stage one makes an event and stage 2 makes a client

The part I'm having trouble with is making the event relate to the client

first part of the form directs the user to the next page and includes the newly created url title

{exp:channel:form return="make-an-event/URL_TITLE"}

In part 2 I want to make the client and add that created event to the clients related entry field

{exp:channel:form require_entry="no" channel="clients" return="thank-you"}

 <input type="text" name="cli_events:url_title[data][]" value="{segment_2}">

but I'm not having much luck

Thanks

0

I was nearly there... '{segment_2}' was url_title but it needed to be entry_id

{exp:channel:form return="make-an-event/ENTRY_ID"}

and

 <input type="text" name="cli_events:url_title[data][]" value="{segment_2}">
| improve this answer | |
0

I've just managed to achieve this using the following code, to relate a Job Note entry to a main Job entry:

{exp:channel:form channel="jobnotes" unique_url_title="yes" return="jobs/edit"}
    <input type="hidden" name="title" value="Job Note" />
    <input type="hidden" name="jobnote-job[data][]" id="jobnote-job" value="entry_id_of_job" />
    {field:jobnote-main}
    <button type="submit">Add Note</button>
{/exp:channel:form}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.