0

With record-edit form i'm using Lightning-input instead of lightning-input-field(for validation and other purpose)

<lightning-record-edit-form record-id={recordId} object-api-name={objectName}  >
   <template for:each={**variable**} for:item="item">
      <div lwc:if={some condition} key={item.id} >
                            <lightning-input data-type="user-input"  name={item.name}  value={item.value} >
                            </lightning-input>
                            
                    </div>
   </template>
<save  &  Cancel buttons with onClick> 
</lightning-record-edit-form>
  1. Not able to save the field values. Did try updating track variable-> variable in the javascript and also saw the changes via console.log but does not save it back the object. Any suggestion to make it work like " lightning-input-field"

2)In lwc:if i want to check if item.value=='apple'||item.value=='banana' something along those lines. I know using Js function would solve but is there any solution in html itself PS: any suggestion using recordId and object'sName

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.