• Resolved sasocreative

    (@sasocreative)


    Hi, I am using Gravity Forms and Pods to create an Event listing page. I have two Pods — Gigs and Venues. They are related via a relationship field in their respective Pods admin.

    I have set up a GF form such that the general public can submit their own events. One of the fields for the GF is a single select drop down so as to select a Venue. That drop down is fed via a GF Pods feed.

    What is happening is this: when i test the form, let’s say I select a venue called “The Bank”; rather than “The Bank” (as text) appearing in the relevant Entries form/column, it instead shows that venue’s ID, say “941”.

    I’ve been over and over it and just can’t work out what is happening. Any ideas?

    Many thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    How did you configure your feed? The only reason it would be showing values incorrectly was if the feed was configured incorrectly, since it builds the value list from the Relationship field defined in the feed.

    Upload a link to screen shots for how you’ve configured the Pods Feed and the field it’s based on.

    Plugin Contributor Jim True

    (@jimtrue)

    @sasocreative Are you still experiencing the issue above? If you are, please respond to the question provided above. If not, please let us know how you resolved the issue.

    Howdy,
    I am having the same effect, and I beleive this comes from the way Gravity builds the <select> tag for a relationship field displaying data from another pod. In my case I have a “Course” pod defining courses and a “Registration” pod taking registrations for the courses.
    In the “Registration” pod, I defined a “course” field populated with the list of courses defined in the course pod.
    In the “Registration” Gravity form, the “Course” field is linked to the “Registration” pod course field, and it show OK.
    When you look at the HTML generated, it shows a <select> tag where each <option> tag has a value of the “Course” pod element ID and a content of the Course pod element title.

    <div class="ginput_container ginput_container_select">
    <select name="input_13" id="input_1_13" class="large gfield_select" aria-required="true" aria-invalid="false">
    <option value="1244">100 – Toutes Techniques</option>
    <option value="1274">200 – Sculpture</option>
    <option value="1282">204 – Sculpture</option>
    </select>
    </div>

    So when the form is submitted the ID is sent back and saved in the database entry instead of the title.

    Hope this helps understand the problem!
    Is there a way to get and save the course title instead of the course ID?

    Plugin Contributor Jim True

    (@jimtrue)

    The post ID of the Course is supposed to be saved in the Database upon posting the form for a Relationship Feed. Relationship fields are based on the ID of the post on the other side of the Relationship. Posting the title wouldn’t connect it to the ID of the Course.

    If you want to pull the course title from the ‘courses’ pod when you’re writing an entry to Registration and use it elsewhere, you’d need to write a Post Save filter or something of that nature to grab the id on saving and use the value in the other post type to be used elsewhere. The above behavior is expected and correct behavior otherwise.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘GF posting ID rather than name’ is closed to new replies.