Popup cannot get data value?

I have used the framework7 popup feature but I don’t understand why the data element value id doesn’t work? I use the same function in other tabs view it works.

Or is there something else I need to do about how to retrieve data values from the id on the popup page?

following my code, the code below does not retrieve the data value from the popup?


<div class="popup popup-swipe-handler popup-swipe-to-close">
                        <div class="page">
                           <div class="swipe-handler"></div>
                           <div class="page-content">
                                 <div class="block-title block-title-large">Text!</div>
                                 <div class="text-editor text-editor-init" data-placeholder="Text..." data-buttons='["bold", "italic", "underline", "strikeThrough"]' data-mode="popover" style="--f7-text-editor-height: 80px">
                                    <div class="text-editor-content" id="content_repost" name="content_repost" contenteditable></div> 

                                 <div class="block">
                                    <input type="hidden" id="id_post_re" name="id_post_re" value="<?php echo $kode; ?>">
                                    <button type="button" class="col button button-outline button-round button-repost" onClick="re_post_data()">Bagikan</button>


var $$ = Dom7;

// Framework7 App main instance
var app  = new Framework7({
  // App routes
  routes: routes,

app.on('tabInit', (tab) => {
   // Create Popup with swipe to close
   var swipeToClosePopup = app.popup.create({
      el: '.popup-swipe-to-close',
      swipeToClose: true,
      swipeHandler: '.swipe-handler',
   /*if (tab.id === 'home') {

function re_post_data() {    
   var id_post = $$("input#id_post_re").val();
   var content_repost = $$("#content_repost").html();

      url: "....",
      method: 'POST',
      data: {id_post:id_post, content_repost:content_repost},
      success: function (response) {
         if (response=='1') {
         else {
            setTimeout(function () {
               app.views.main.router.navigate('/social/',{force:true,reloadCurrent: true, ignoreCache: true});
            }, 2000);

Please help.

Is your re_post_data() function ever called? Try console.log inside

function re_post_data() {
   var id_post = $$("input#id_post_re").val();
   var content_repost = $$("#content_repost").html();

I do not understand why the value id is not taken?
if i use it in tabs view. it works.

I can suggest that there is more than one element in DOM with content_repost ID

Well, maybe that’s my problem, I’ve changed my application to use the page without using popups and it works well. thank you for taking the time.