Skip to content

Commit

Permalink
[SDPAP-6961] Added changes to capture custom confirmation message usi…
Browse files Browse the repository at this point in the history
…ng token for webforms. (#1262)

* [SDPAP-6961] Added changes to capture custom confirmation message using token for webforms and Added hidden option for the field type hidden.
  • Loading branch information
MdNadimHossain committed Nov 28, 2022
1 parent 128ace8 commit 50f66f6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ export default {
}
}
} else {
const res = await this.postForm(formId, formData)
const resData = await this.postForm(formId, formData)

if (res) {
if (resData) {
this.formData.formState = {
response: {
status: 'success',
message: this.messages.success
message: resData.attributes.notes ? resData.attributes.notes : this.messages.success
}
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ export default {
}
}
} else {
const res = await this.postForm(formId, formData)
if (res) {
const resData = await this.postForm(formId, formData)
if (resData) {
this.formData.formState = {
response: {
status: 'success',
message: this.formData.messages.success || this.messages.success
message: resData.attributes.notes ? resData.attributes.notes : (this.formData.messages.success || this.messages.success)
}
}
// TODO: vicpol support, need to be reviewed when we add this feature into SDP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ module.exports = {
case 'hidden':
field.type = 'input'
field.inputType = 'hidden'
field.visible = false
if (defaultValue) data.model[eName] = defaultValue
break

Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-nuxt-tide/modules/webform/mixins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const webform = {
const url = formResource + '/' + formId
const res = await this.$tide.post(url, data)
if (res.data) {
return true
return res.data
}
return false
} catch (e) {
Expand Down

0 comments on commit 50f66f6

Please sign in to comment.