• Resolved warcher88

    (@warcher88)


    Hello please help.

    I get a ‘json error’ when mapping form fields to post meta-fields, i also get the below console error.

    ‘ HybridDropdownError:Option list has duplicate value: ‘

    I have listed all the options in the dropdown below, there are no duplicates.

    your-name
    your-email
    your-title
    phone
    category
    materials
    add-material-box
    add-material
    brand
    add-brand-box
    add-brand
    Condition
    blade-type
    your-message
    price
    blade-photo
    show
    menu-222

    It is mapping to a custom post if that makes a difference. Not sure whats going on. Help would be greatly appreciated
    thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    that’s odd indeed. can you post a copy of your form HTML code here so I can test it on my server

    Hey thanks for the quick reply, the form can be found here: https://bladetrader.com.au/sell-your-blade/

    I just remembered that i had to change some of the custom field names at one point. Not sure if that has anything to do with it?

    For example i changed your-phone to a_your-phone, and your-name to a_your-name

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Hey thanks for the quick reply, the form can be found here:

    I meant the code from the form editor itself.

    I just remembered that i had to change some of the custom field names at one point. Not sure if that has anything to do with it?

    no shouldn’t so long as they are unique

    Thread Starter warcher88

    (@warcher88)

    ah right, this is what i have in Contact Form 7

    <div class=”splitCol”>
    <div class=”halfCol”>
    <label> Your name
    [text* your-name] </label></div>
    <div class=”halfCol”>
    <label> Your email
    [email* your-email] </label></div>
    </div>

    <div class=”splitCol”>
    <div class=”halfCol”>
    <label> Advertisement Title
    [text* your-title] </label>
    </div>
    <div class=”halfCol”>
    <label> Phone
    [tel* phone]</label>
    </div>
    </div>
    <div class=”fullCol”>
    <label> Blade Category
    [select* category multiple] </label>
    </div>
    <div class=”fullCol”>
    <label> Blade Materials
    [select materials multiple] </label>
    </div>
    <div class=”fullCol”>
    [checkbox add-material-box use_label_element “Add Material”]
    [group add-material]
    <label> Add Material
    [text add-material]</label>
    [/group]</div>
    <div class=”fullCol”>
    <label> Blade Brand
    [select brand ]</label></div>
    <div class=”fullCol”>
    [checkbox add-brand-box use_label_element “Add New Brand”]
    [group add-brand]
    <label> Add Brand
    [text add-brand ]</label>
    [/group]</div>

    <div class=”splitCol”>
    <div class=”halfCol”>
    <label> Blade Condition
    [select* Condition ]</label></div>
    <div class=”halfCol”>
    <label> Blade Type
    [select* blade-type]</label></div>
    </div>
    <div class=”fullCol”>
    <label> Blade Description
    [textarea* your-message] </label></div>
    <div class=”fullCol”>
    <label> Blade Price
    [text* price] </label></div>
    <div class=”fullCol”>
    <label> Blade Photo
    [file* blade-photo limit:999999] </label></div>

    <div><p style=”width: 5%; display: inline-block; float: left;”> [checkbox* show use_label_element]</p>
    <p style=”width: 93%; display: inline-block; float: left; padding-left: 10px;”> I warrant that I am over 18 years of age and that I understand the rules regarding using bladetrader.com.au and agree with the terms and conditions.</p></div>

    <div style=”width: 49%; max-width: 100px; display: inline-block; float: left;”>[submit “Submit”] </div>
    <div style=”width: 49%; max-width: 200px; display: inline-block; float: left;”> [select menu-222 “Pay with PayPal|paypal” ]</div><p style=”display: inline-block; font-weight: bold; color: #b52926″> $20</p>`

    Plugin Author Aurovrata Venet

    (@aurovrata)

    thanks, it works fine for me.

    can you try and create a new form and paste this html code in the new form to see if the json error persists

    Thread Starter warcher88

    (@warcher88)

    Hey,

    I copied the code into a new form and It looks like it works when i try to link it to the standard WordPress post, however the error persists when i try to link it to my custom post type ‘Advertisements’.

    It also works if i link to the other custom post type that i have, just not the one i need. Is there a way to ‘refresh’ the json on a custom post type?

    I used the CPT UI plugin to make the custom post type and it has worked perfectly. This is the only problem i have had with it

    Thread Starter warcher88

    (@warcher88)

    Another thing, i went into PHPmyAdmin and looked at the wp_terms table. I found a few duplicates in there which i deleted. I thought i was on the right track but it still doesn’t work

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I used the CPT UI plugin to make the custom post type and it has worked perfectly. This is the only problem i have had with it

    as a rule of thumb I always recommend that mapping to new custom post type should be handled by the plugin itself rather than creating the post type with another plugin and then mapping it to the newly created existing post type. However, that shouldn’t cause json errors.

    Can you please reach out to me on vrata at syllogic dot in

    Hello,

    So i might need to completely remake the custom post type?

    I tried syllogic.in but i think the website is down? “This site can’t be reached”

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Can you please reach out to me on vrata at syllogic dot in

    “vrata at syllogic dot in”

    Understood, I have sent a follow up email to your email address

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘json error when mapping form fields to post meta-fields’ is closed to new replies.