Hide form title via URL param (#89)

* Hide form title via URL param

* FormUrlPrefill smal fixes
This commit is contained in:
Chirag Chhatrala
2023-02-22 21:09:13 +05:30
committed by GitHub
parent b101a5daba
commit 47964ec565
8 changed files with 110 additions and 15 deletions

View File

@@ -23,7 +23,8 @@ export default {
name: 'EmbedCode',
components: { CopyContent },
props: {
form: { type: Object, required: true }
form: { type: Object, required: true },
extraQueryParam: { type: String, default: '' }
},
data: () => ({
@@ -32,11 +33,12 @@ export default {
computed: {
embedCode() {
return '<iframe style="border:none;width:100%;" height="' + this.formHeight + 'px" src="' + this.form.share_url + '"></iframe>'
const share_url = (this.extraQueryParam) ? this.form.share_url + "?" + this.extraQueryParam : this.form.share_url + this.extraQueryParam
return '<iframe style="border:none;width:100%;" height="' + this.formHeight + 'px" src="' + share_url + '"></iframe>'
},
formHeight() {
let height = 200
if (!this.form.hide_title) {
if (!this.form.hide_title && !this.extraQueryParam) {
height += 60
}
height += this.form.properties.filter((property) => {