OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce Additional field in registration form shows empty-error (but it is NOT)

This topic contains 1 reply, has 1 voice, and was last updated by  Frank 3 weeks, 2 days ago.

  • Creator
    Topic
  • #40738

    Frank
    Participant

    Hi there,

    I wanted to link registered customers to a certail product, he might be interested in.

    In my extended customer bundle, I created an addtional event listener:

    In order to make it the visitor easier to select a product, I have used
    RequestProductType::class
    for the builder (see line #28 above).

    It results in an additional field in the registration form, what reflects 100% of what I want.

    See screenshot here:
    https://snipboard.io/JnIoDp.jpg (empty form)

    However, if I fill in the registration data, select a product, form submission results in an
    ‘field cannot be empty’-validation error below the linkedProduct-input(select-field.

    See screenshot again:
    https://snipboard.io/HtBlco.jpg (with filled in fields, and validation error).

    Please find attached, customerLinkedProduct_formField.html.

    It seems, RequestProductType::class is ‘too much’ for my purpose, as it includes additional, not needed options to select …

    Do you have any suggestions, what type I could use to get the autocomplete-function for product-selection (name/select)?

    Thanks a lot.
    Frank

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #40742

    Frank
    Participant

    I found a solution for myself:

    – Extend a custom RequestProductType.php
    – Changed scope from ‘rfp’ to ‘customer’ (line #21 below).

    … and it works.

    However, it seems to me, that a can make my custom RequestProductType more slim. If anyone has a suggestion for that, it would be helpful.

    Thanks for watching
    Frank

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No